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","."]
docstr: Reconstructs the list of :class:`torch_geometric.data.Data` objects
  from the batch object.
  The batch object must have been created via :meth:`from_data_list` in
  order to be able to reconstruct the initial objects.
docstr_tok: ["Reconstructs","the","list","of",":","class",":","`","torch_geometric.data.Data","`","objects","from","the","batch","object",".","The","batch","object","must","have","been","created","via",":","meth",":","`","from_data_list","`","in","order","to","be","able","to","reconstruct","the","initial","objects","."]
code: def to_data_list(self):
      r"""
      Reconstructs the list of :class:`torch_geometric.data.Data` objects
      from the batch object.
      The batch object must have been created via :meth:`from_data_list` in
      order to be able to reconstruct the initial objects.
      """
      if self.__slices__ is None:
          raise RuntimeError(
              "Cannot reconstruct data list from batch because the "
              "batch object was not created using Batch.from_data_list()"
          )
  
      keys = [key for key in self.keys if key[-5:] != "batch"]
      cumsum = {key: 0 for key in keys}
      data_list = []
      for i in range(len(self.__slices__[keys[0]]) - 1):
          # i: from 0 up to num graphs in the batch
          data = self.__data_class__()
          self._reconstruct_dict(
              i, keys, data, cumsum, self.__slices__, self, data
          )
          data_list.append(data)
  
      return data_list
  
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 7 for calling the Batch obj's underlying member method code with example usage: obj.to_data_list() and returns: data_list