class_docstr: Batch sequence generator.
  
  Take a (list of) input tensors and a batch size
  and creates a generators that creates a sequence of batches.
  
  :param Xs: One or a list of tensors. First axis needs to have same length.
  :param batch_size: Batch size. Default 32.
class_docstr_tok: ["Batch","sequence","generator",".","Take","a","(","list","of",")","input","tensors","and","a","batch","size","and","creates","a","generators","that","creates","a","sequence","of","batches",".",":","param","Xs",":","One","or","a","list","of","tensors",".","First","axis","needs","to","have","same","length",".",":","param","batch_size",":","Batch","size",".","Default","32","."]
code: def __getitem__(self, idx: int) -> Tensor | tuple[Tensor]:
      ret: list[Tensor] = [
          X[idx * self.batch_size : (idx + 1) * self.batch_size]
          for X in self.Xs
      ]
  
      if self.single_tensor:
          return ret[0]
      return tuple(ret)
  
file_path: innvestigate/src/innvestigate/utils/sequence.py
imports: from __future__ import annotations
  import math
  from typing import Callable
  import tensorflow.keras.utils
  from innvestigate.backend import to_list
  from innvestigate.backend.types import OptionalList, Tensor
label_desc: Use image node_id 3 for calling the BatchSequence obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: tuple, ret