class_docstr: A plain python object modeling a heterogeneous graph with various
  attributes (Node types in :class:`HeteroGraph` require string type).
  
  Args:
      G (:class:`networkx.classes.graph`): A NetworkX graph object which
          contains features and labels for each node type and edge type.
      **kwargs: Keyworded argument list with keys such
          as :obj:`"node_feature"`, :obj:`"node_label"` and
          corresponding attributes.
class_docstr_tok: ["A","plain","python","object","modeling","a","heterogeneous","graph","with","various","attributes","(","Node","types","in",":","class",":","`","HeteroGraph","`","require","string","type",")",".","Args",":","G","(",":","class",":","`","networkx.classes.graph","`",")",":","A","NetworkX","graph","object","which","contains","features","and","labels","for","each","node","type","and","edge","type",".","*","*","kwargs",":","Keyworded","argument","list","with","keys","such","as",":","obj",":","`","``","node_feature","''","`",",",":","obj",":","`","``","node_label","''","`","and","corresponding","attributes","."]
docstr: Return the node feature dimension for one node type or 
  for a list of node types.
  
  Args:
      node_type (str or list): Specified node type(s).
  
  Returns:
      int or dict: The node feature dimension for specified node type(s).
docstr_tok: ["Return","the","node","feature","dimension","for","one","node","type","or","for","a","list","of","node","types",".","Args",":","node_type","(","str","or","list",")",":","Specified","node","type","(","s",")",".","Returns",":","int","or","dict",":","The","node","feature","dimension","for","specified","node","type","(","s",")","."]
code: def num_node_features(self, node_type: Union[str, List[str]] = None):
      r"""
      Return the node feature dimension for one node type or
      for a list of node types.
  
      Args:
          node_type (str or list): Specified node type(s).
  
      Returns:
          int or dict: The node feature dimension for specified node type(s).
      """
      if "node_feature" not in self:
          return 0
  
      if node_type is None:
          node_type = self.node_types
      if (
          isinstance(node_type, str)
          or isinstance(node_type, int)
          or isinstance(node_type, float)
      ):
          if node_type in self["node_feature"]:
              return self.get_num_dims(
                  "node_feature", node_type, as_label=False
              )
          else:
              raise ValueError(
                  "Node type does not exist in stored node feature."
              )
      if isinstance(node_type, list):
          if not all(
              node_type_i in self["node_feature"]
              for node_type_i in node_type
          ):
              raise ValueError(
                  "Some node types do not exist in stored node feature."
              )
          else:
              num_nodes_feature_dict = {}
              for node_type_i in node_type:
                  num_nodes_feature_dict[
                      node_type_i
                  ] = self.get_num_dims(
                      "node_feature", node_type_i, as_label=False
                  )
              return num_nodes_feature_dict
      else:
          raise TypeError("Node types have unexpected type.")
  
imports: import math
  import copy
  import random
  import torch
  import networkx
  import numpy
  from deepsnap.graph import Graph
  from typing import Dict, List, Union
  import warnings
label_desc: Use image node_id 6 for calling the HeteroGraph obj's underlying member method code with example usage: obj.num_node_features(node_type) and returns: int, self, num_nodes_feature_dict