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: custom support version of _split_edge
docstr_tok: ["custom","support","version","of","_split_edge"]
code: def _custom_split_edge(self):
      r"""
      custom support version of _split_edge
      """
      split_num = len(self.general_splits)
      split_graph = []
  
      for i in range(split_num):
          graph = copy.copy(self)
          graph.edge_label_index = self._edge_to_index(
              self.general_splits[i], list(self.G.nodes(data=True))
          )
  
          edge_labels = {}
          for edge in self.general_splits[i]:
              edge_label = edge[-1]["edge_label"]
              edge_type = edge[-1]["edge_type"]
              head_type = self.G.nodes[edge[0]]["node_type"]
              tail_type = self.G.nodes[edge[1]]["node_type"]
              message_type = (head_type, edge_type, tail_type)
              if message_type not in edge_labels:
                  edge_labels[message_type] = []
              edge_labels[message_type].append(edge_label)
          for message_type in edge_labels:
              edge_labels[message_type] = torch.tensor(
                  edge_labels[message_type]
              )
          if self.is_undirected():
              for message_type in edge_labels:
                  edge_labels[message_type] = torch.cat(
                      [
                          edge_labels[message_type],
                          edge_labels[message_type],
                      ],
                      dim=1,
                  )
          graph.edge_label = edge_labels
          split_graph.append(graph)
      return split_graph
  
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 35 for calling the HeteroGraph obj's underlying member method code with example usage: obj._custom_split_edge() and returns: split_graph