class_docstr: A data object describing a batch of graphs as one big (disconnected)
  graph.
  Inherits from :class:`torch_geometric.data.Data` or
  :class:`torch_geometric.data.HeteroData`.
  In addition, single graphs can be identified via the assignment vector
  :obj:`batch`, which maps each node to its respective graph identifier.
  
  :pyg:`PyG` allows modification to the underlying batching procedure by
  overwriting the :meth:`~Data.__inc__` and :meth:`~Data.__cat_dim__`
  functionalities.
  The :meth:`~Data.__inc__` method defines the incremental count between two
  consecutive graph attributes.
  By default, :pyg:`PyG` increments attributes by the number of nodes
  whenever their attribute names contain the substring :obj:`index`
  (for historical reasons), which comes in handy for attributes such as
  :obj:`edge_index` or :obj:`node_index`.
  However, note that this may lead to unexpected behavior for attributes
  whose names contain the substring :obj:`index` but should not be
  incremented.
  To make sure, it is best practice to always double-check the output of
  batching.
  Furthermore, :meth:`~Data.__cat_dim__` defines in which dimension graph
  tensors of the same attribute should be concatenated together.
class_docstr_tok: ["A","data","object","describing","a","batch","of","graphs","as","one","big","(","disconnected",")","graph",".","Inherits","from",":","class",":","`","torch_geometric.data.Data","`","or",":","class",":","`","torch_geometric.data.HeteroData","`",".","In","addition",",","single","graphs","can","be","identified","via","the","assignment","vector",":","obj",":","`","batch","`",",","which","maps","each","node","to","its","respective","graph","identifier",".",":","pyg",":","`","PyG","`","allows","modification","to","the","underlying","batching","procedure","by","overwriting","the",":","meth",":","`","~Data.__inc__","`","and",":","meth",":","`","~Data.__cat_dim__","`","functionalities",".","The",":","meth",":","`","~Data.__inc__","`","method","defines","the","incremental","count","between","two","consecutive","graph","attributes",".","By","default",",",":","pyg",":","`","PyG","`","increments","attributes","by","the","number","of","nodes","whenever","their","attribute","names","contain","the","substring",":","obj",":","`","index","`","(","for","historical","reasons",")",",","which","comes","in","handy","for","attributes","such","as",":","obj",":","`","edge_index","`","or",":","obj",":","`","node_index","`",".","However",",","note","that","this","may","lead","to","unexpected","behavior","for","attributes","whose","names","contain","the","substring",":","obj",":","`","index","`","but","should","not","be","incremented",".","To","make","sure",",","it","is","best","practice","to","always","double-check","the","output","of","batching",".","Furthermore",",",":","meth",":","`","~Data.__cat_dim__","`","defines","in","which","dimension","graph","tensors","of","the","same","attribute","should","be","concatenated","together","."]
code: def __len__(self) -> int:
      return self.num_graphs
  
imports: import inspect
  from collections.abc import Sequence
  from typing import Any, List, Optional, Type, Union
  import numpy
  import torch
  from torch import Tensor
  from typing_extensions import Self
  from torch_geometric.data.collate import collate
  from torch_geometric.data.data import BaseData, Data
  from torch_geometric.data.dataset import IndexType
  from torch_geometric.data.separate import separate
label_desc: Use image node_id 8 for calling the Batch obj's underlying member method code with example usage: obj.__len__() and returns: self