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: Returns the dimension for which :obj:`value` of attribute
  :obj:`key` will get concatenated when creating batches.
  
  .. note::
  
    This method is for internal use only, and should only be overridden
    if the batch concatenation process is corrupted for a specific data
    attribute.
docstr_tok: ["Returns","the","dimension","for","which",":","obj",":","`","value","`","of","attribute",":","obj",":","`","key","`","will","get","concatenated","when","creating","batches",".","..","note",":",":","This","method","is","for","internal","use","only",",","and","should","only","be","overridden","if","the","batch","concatenation","process","is","corrupted","for","a","specific","data","attribute","."]
code: def __cat_dim__(self, key: str, value) -> int:
      r"""
      Returns the dimension for which :obj:`value` of attribute
      :obj:`key` will get concatenated when creating batches.
  
      .. note::
  
        This method is for internal use only, and should only be overridden
        if the batch concatenation process is corrupted for a specific data
        attribute.
      """
      # `*index*` and `*face*` should be concatenated in the last dimension,
      # everything else in the first dimension.
      if (
          isinstance(key, tuple)
          and torch.is_tensor(value)
          and len(value.shape) == 2
          and value.shape[0] == 2
          and value.shape[1] >= self.num_edges(key)
      ):
          return -1
      return 0
  
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 40 for calling the HeteroGraph obj's underlying member method code with example usage: obj.__cat_dim__(key, value) and returns: int, unknown