class_docstr: A data object describing a homogeneous graph together with each node's
  rooted subgraph.
  
  It contains several additional properties that hold the information to map
  to batch of every node's rooted subgraph:
  
  * :obj:`sub_edge_index` (Tensor): The edge indices of all combined rooted
    subgraphs.
  * :obj:`n_id` (Tensor): The indices of nodes in all combined rooted
    subgraphs.
  * :obj:`e_id` (Tensor): The indices of edges in all combined rooted
    subgraphs.
  * :obj:`n_sub_batch` (Tensor): The batch vector to distinguish nodes across
    different subgraphs.
  * :obj:`e_sub_batch` (Tensor): The batch vector to distinguish edges across
    different subgraphs.
class_docstr_tok: ["A","data","object","describing","a","homogeneous","graph","together","with","each","node's","rooted","subgraph",".","It","contains","several","additional","properties","that","hold","the","information","to","map","to","batch","of","every","node","'s","rooted","subgraph",":","*",":","obj",":","`","sub_edge_index","`","(","Tensor",")",":","The","edge","indices","of","all","combined","rooted","subgraphs",".","*",":","obj",":","`","n_id","`","(","Tensor",")",":","The","indices","of","nodes","in","all","combined","rooted","subgraphs",".","*",":","obj",":","`","e_id","`","(","Tensor",")",":","The","indices","of","edges","in","all","combined","rooted","subgraphs",".","*",":","obj",":","`","n_sub_batch","`","(","Tensor",")",":","The","batch","vector","to","distinguish","nodes","across","different","subgraphs",".","*",":","obj",":","`","e_sub_batch","`","(","Tensor",")",":","The","batch","vector","to","distinguish","edges","across","different","subgraphs","."]
code: def __inc__(
      self, key: str, value: Any, *args: Any, **kwargs: Any
  ) -> Any:
      if key == "sub_edge_index":
          return self.n_id.size(0)
      if key in ["n_sub_batch", "e_sub_batch"]:
          return 1 + int(self.n_sub_batch[-1])
      elif key == "n_id":
          return self.num_nodes
      elif key == "e_id":
          assert self.edge_index is not None
          return self.edge_index.size(1)
      return super().__inc__(key, value, *args, **kwargs)
  
imports: import copy
  from abc import ABC, abstractmethod
  from typing import Any, Tuple
  import torch
  from torch import Tensor
  from torch_geometric.data import Data
  from torch_geometric.transforms import BaseTransform
  from torch_geometric.utils import to_torch_csc_tensor
label_desc: Use image node_id 1 for calling the RootedSubgraphData obj's underlying member method code with example usage: obj.__inc__(key, value) and returns: super, self, unknown, self, self