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: Split current heterogeneous graph object to a list of heterogeneous 
  graph objects.
  
  Args:
      task (str): One of `node`, `edge` or `link_pred`.
      split_types (str or list): Types splitted on. Default is `None`
          which will split all the types for the specified task.
      split_ratio (list): A list of ratios such as
          `[train_ratio, validation_ratio, test_ratio]`.
      edge_split_mode (str): "exact" or "approximate".
      shuffle (bool): Whether to shuffle data for the splitting.
  
  Returns:
      list: A list of :class:`HeteroGraph` objects.
docstr_tok: ["Split","current","heterogeneous","graph","object","to","a","list","of","heterogeneous","graph","objects",".","Args",":","task","(","str",")",":","One","of","`","node","`",",","`","edge","`","or","`","link_pred","`",".","split_types","(","str","or","list",")",":","Types","splitted","on",".","Default","is","`","None","`","which","will","split","all","the","types","for","the","specified","task",".","split_ratio","(","list",")",":","A","list","of","ratios","such","as","`","[","train_ratio",",","validation_ratio",",","test_ratio","]","`",".","edge_split_mode","(","str",")",":","``","exact","''","or","``","approximate","''",".","shuffle","(","bool",")",":","Whether","to","shuffle","data","for","the","splitting",".","Returns",":","list",":","A","list","of",":","class",":","`","HeteroGraph","`","objects","."]
code: def split(
      self,
      task: str = "node",
      split_types: Union[str, List[str], tuple, List[tuple]] = None,
      split_ratio: List[float] = None,
      edge_split_mode: str = "exact",
      shuffle: bool = True,
  ):
      r"""
      Split current heterogeneous graph object to a list of heterogeneous
      graph objects.
  
      Args:
          task (str): One of `node`, `edge` or `link_pred`.
          split_types (str or list): Types splitted on. Default is `None`
              which will split all the types for the specified task.
          split_ratio (list): A list of ratios such as
              `[train_ratio, validation_ratio, test_ratio]`.
          edge_split_mode (str): "exact" or "approximate".
          shuffle (bool): Whether to shuffle data for the splitting.
  
      Returns:
          list: A list of :class:`HeteroGraph` objects.
      """
      if split_ratio is None:
          split_ratio = [0.8, 0.1, 0.1]
      if not isinstance(split_ratio, list):
          raise TypeError("Split ratio must be a list.")
      if len(split_ratio) != 3:
          raise ValueError("Split ratio must contain three values.")
      if not math.isclose(sum(split_ratio), 1.0):
          raise ValueError("Split ratio must sum up to 1.")
      if not all(
          isinstance(split_ratio_i, float)
          for split_ratio_i in split_ratio
      ):
          raise TypeError("Split ratio must contain all floats.")
      if not all(split_ratio_i > 0 for split_ratio_i in split_ratio):
          raise ValueError(
              "Split ratio must contain all positivevalues."
          )
  
      if task == "node":
          return self._split_node(
              split_types, split_ratio, shuffle=shuffle
          )
      elif task == "edge":
          return self._split_edge(
              split_types, split_ratio, shuffle=shuffle
          )
      elif task == "link_pred":
          return self.split_link_pred(
              split_types, split_ratio, edge_split_mode, shuffle=shuffle
          )
      elif task == "graph":
          raise ValueError(
              "Graph task does not split individual graphs."
          )
      else:
          raise ValueError("Unknown task.")
  
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 36 for calling the HeteroGraph obj's underlying member method code with example usage: obj.split(task, split_types, split_ratio, edge_split_mode, shuffle) and returns: self, self, self