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: Applies a transformation to each graph object in parallel by first
  calling `to_data_list`, applying the transform, and then perform
  re-batching again to a `Batch`.
  A transform should edit the graph object,
  including changing the graph structure, or adding
  node / edge / graph level attributes.
  The rest are automatically handled by the
  :class:`deepsnap.graph.Graph` object, including everything
  ended with `index`.
  
  Args:
      transform (callable): Transformation function applied to each graph object.
      update_tensor (bool): Whether use nx graph to update tensor attributes.
      update_graph (bool): Whether use tensor attributes to update nx graphs.
      deep_copy (bool): :obj:`True` if a new deep copy of batch is returned.
          This option allows modifying the batch of graphs without
          changing the graphs in the original dataset.
      kwargs: Parameters used in the transform function for each
          :class:`deepsnap.graph.Graph`.
  
  Returns:
      A batch object containing all transformed graph objects.
docstr_tok: ["Applies","a","transformation","to","each","graph","object","in","parallel","by","first","calling","`","to_data_list","`",",","applying","the","transform",",","and","then","perform","re-batching","again","to","a","`","Batch","`",".","A","transform","should","edit","the","graph","object",",","including","changing","the","graph","structure",",","or","adding","node","\/","edge","\/","graph","level","attributes",".","The","rest","are","automatically","handled","by","the",":","class",":","`","deepsnap.graph.Graph","`","object",",","including","everything","ended","with","`","index","`",".","Args",":","transform","(","callable",")",":","Transformation","function","applied","to","each","graph","object",".","update_tensor","(","bool",")",":","Whether","use","nx","graph","to","update","tensor","attributes",".","update_graph","(","bool",")",":","Whether","use","tensor","attributes","to","update","nx","graphs",".","deep_copy","(","bool",")",":",":","obj",":","`","True","`","if","a","new","deep","copy","of","batch","is","returned",".","This","option","allows","modifying","the","batch","of","graphs","without","changing","the","graphs","in","the","original","dataset",".","kwargs",":","Parameters","used","in","the","transform","function","for","each",":","class",":","`","deepsnap.graph.Graph","`",".","Returns",":","A","batch","object","containing","all","transformed","graph","objects","."]
code: def apply_transform(
      self,
      transform,
      update_tensor: bool = True,
      update_graph: bool = False,
      deep_copy: bool = False,
      **kwargs,
  ):
      r"""
      Applies a transformation to each graph object in parallel by first
      calling `to_data_list`, applying the transform, and then perform
      re-batching again to a `Batch`.
      A transform should edit the graph object,
      including changing the graph structure, or adding
      node / edge / graph level attributes.
      The rest are automatically handled by the
      :class:`deepsnap.graph.Graph` object, including everything
      ended with `index`.
  
      Args:
          transform (callable): Transformation function applied to each graph object.
          update_tensor (bool): Whether use nx graph to update tensor attributes.
          update_graph (bool): Whether use tensor attributes to update nx graphs.
          deep_copy (bool): :obj:`True` if a new deep copy of batch is returned.
              This option allows modifying the batch of graphs without
              changing the graphs in the original dataset.
          kwargs: Parameters used in the transform function for each
              :class:`deepsnap.graph.Graph`.
  
      Returns:
          A batch object containing all transformed graph objects.
  
      """
      # TODO: transductive setting, assert update_tensor == True
      return self.from_data_list(
          [
              Graph(graph).apply_transform(
                  transform,
                  update_tensor,
                  update_graph,
                  deep_copy,
                  **kwargs,
              )
              for graph in self.G
          ]
      )
  
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 10 for calling the Batch obj's underlying member method code with example usage: obj.apply_transform(transform, update_tensor, update_graph, deep_copy) and returns: self