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 feature dimension for specified message type(s).
  
  Args:
      message_type (tuple or list): Specified message type(s).
  
  Returns:
      int or dict: The feature dimension for specified message type(s).
docstr_tok: ["Return","the","feature","dimension","for","specified","message","type","(","s",")",".","Args",":","message_type","(","tuple","or","list",")",":","Specified","message","type","(","s",")",".","Returns",":","int","or","dict",":","The","feature","dimension","for","specified","message","type","(","s",")","."]
code: def num_edge_features(
      self, message_type: Union[tuple, List[tuple]] = None
  ):
      r"""
      Return the feature dimension for specified message type(s).
  
      Args:
          message_type (tuple or list): Specified message type(s).
  
      Returns:
          int or dict: The feature dimension for specified message type(s).
      """
  
      if "edge_feature" not in self:
          return 0
  
      if "edge_index" not in self:
          raise ValueError("Edge indices is not available")
      if message_type is None:
          message_type = self.message_types
      if isinstance(message_type, tuple):
          if message_type in self["edge_index"]:
              return self.get_num_dims(
                  "edge_feature", message_type, as_label=False
              )
          else:
              raise ValueError(
                  "Edge type does not exist in stored edge feature."
              )
      if isinstance(message_type, list):
          if not all(
              isinstance(message_type_i, tuple)
              for message_type_i in message_type
          ):
              raise ValueError("Edge type must be tuple.")
          if not all(
              message_type_i in self["edge_index"]
              for message_type_i in message_type
          ):
              raise ValueError(
                  "Some edge types do not exist in stored edge feature."
              )
          else:
              num_edges_feature_dict = {}
              for message_type_i in message_type:
                  num_edges_feature_dict[
                      message_type_i
                  ] = self.get_num_dims(
                      "edge_feature", message_type_i, as_label=False
                  )
  
              return num_edges_feature_dict
      else:
          raise TypeError("Edge type must be tuple or list of tuple")
  
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 10 for calling the HeteroGraph obj's underlying member method code with example usage: obj.num_edge_features(message_type) and returns: int, self, num_edges_feature_dict