class_docstr: A plain old python object modeling a batch of
  :class:`deepsnap.graph.Graph` objects as one big (disconnected) graph,
  with :class:`torch_geometric.data.Data` being the
  base class that all its methods can also be used here.
  In addition, graphs can be reconstructed via the assignment vector
  :obj:`batch`, which maps each node to its respective graph identifier.
  
  .. note::
  
      For more detailed use of :class:`deepsnap.batch.Batch`, see the `examples 
      <https://github.com/snap-stanford/deepsnap/tree/master/examples>`_ folder.
class_docstr_tok: ["A","plain","old","python","object","modeling","a","batch","of",":","class",":","`","deepsnap.graph.Graph","`","objects","as","one","big","(","disconnected",")","graph",",","with",":","class",":","`","torch_geometric.data.Data","`","being","the","base","class","that","all","its","methods","can","also","be","used","here",".","In","addition",",","graphs","can","be","reconstructed","via","the","assignment","vector",":","obj",":","`","batch","`",",","which","maps","each","node","to","its","respective","graph","identifier",".","..","note",":",":","For","more","detailed","use","of",":","class",":","`","deepsnap.batch.Batch","`",",","see","the","`","examples","<","https",":","\/\/github.com\/snap-stanford\/deepsnap\/tree\/master\/examples",">","`","_","folder","."]
code: def _reconstruct_dict(
      self,
      graph_idx: int,
      keys,
      data_dict,
      cumsum: Dict[str, int],
      slices,
      batched_dict,
      graph,
  ):
      for key in keys:
          if isinstance(batched_dict[key], dict):
              # recursively unbatch the dict
              data_dict[key] = {}
              inner_keys = [
                  inner_key
                  for inner_key in batched_dict[key].keys()
                  if inner_key[-5:] != "batch"
              ]
              inner_cumsum = {inner_key: 0 for inner_key in inner_keys}
              inner_slices = slices[key]
              self._reconstruct_dict(
                  graph_idx,
                  inner_keys,
                  data_dict[key],
                  inner_cumsum,
                  inner_slices,
                  batched_dict[key],
                  graph,
              )
              continue
  
          if torch.is_tensor(batched_dict[key]):
              data_dict[key] = batched_dict[key].narrow(
                  graph.__cat_dim__(key, batched_dict[key]),
                  slices[key][graph_idx],
                  slices[key][graph_idx + 1] - slices[key][graph_idx],
              )
              if batched_dict[key].dtype != torch.bool:
                  data_dict[key] = data_dict[key] - cumsum[key]
          else:
              data_dict[key] = batched_dict[key][
                  slices[key][graph_idx] : slices[key][graph_idx + 1]
              ]
          cumsum[key] = cumsum[key] + graph.__inc__(key, data_dict[key])
  
file_path: deepsnap/deepsnap/batch.py
imports: import torch
  from deepsnap.graph import Graph
  from deepsnap.hetero_graph import HeteroGraph
  from typing import Callable, Dict, List
label_desc: Use image node_id 8 for calling the Batch obj's underlying member method code with example usage: obj._reconstruct_dict(graph_idx, keys, data_dict, cumsum, slices, batched_dict, graph) without return types