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 map_data(self) -> Data:
      # Maps all feature information of the :class:`Data` object to each
      # rooted subgraph.
      data = copy.copy(self)
  
      for key, value in self.items():
          if key in ["sub_edge_index", "n_id", "e_id", "e_sub_batch"]:
              del data[key]
          elif key == "n_sub_batch":
              continue
          elif key == "num_nodes":
              data.num_nodes = self.n_id.size(0)
          elif key == "edge_index":
              data.edge_index = self.sub_edge_index
          elif self.is_node_attr(key):
              dim = self.__cat_dim__(key, value)
              data[key] = value.index_select(dim, self.n_id)
          elif self.is_edge_attr(key):
              dim = self.__cat_dim__(key, value)
              data[key] = value.index_select(dim, self.e_id)
  
      return data
  
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 2 for calling the RootedSubgraphData obj's underlying member method code with example usage: obj.map_data() and returns: data