dgl.num_nodes() (method) def num_nodes(ntype: Any | None = None) -> Any Return the number of nodes in the graph. Parameters ntype : str, optional The