class_docstr: Samples according to the underlying instance of ``Sampler``, but splits
  the index sequences into smaller chunks.
  
  Used to split large logical batches into physical batches of a smaller size,
  while coordinating with DPOptimizer when the logical batch has ended.
code: def __len__(self):
      if isinstance(self.sampler, BatchSampler):
          return int(
              len(self.sampler)
              * (self.sampler.batch_size / self.max_batch_size)
          )
      elif isinstance(
          self.sampler, UniformWithReplacementSampler
      ) or isinstance(
          self.sampler, DistributedUniformWithReplacementSampler
      ):
          expected_batch_size = (
              self.sampler.sample_rate * self.sampler.num_samples
          )
          return int(
              len(self.sampler)
              * (expected_batch_size / self.max_batch_size)
          )
  
      return len(self.sampler)
  
file_path: opacus/opacus/utils/batch_memory_manager.py
imports: import math
  from typing import List
  import numpy
  from opacus.optimizers import DPOptimizer
  from opacus.utils.uniform_sampler import DistributedUniformWithReplacementSampler, UniformWithReplacementSampler
  from torch.utils.data import BatchSampler, DataLoader, Sampler
label_desc: Use image node_id 3 for calling the BatchSplittingSampler obj's underlying member method code with example usage: obj.__len__() and returns: len, int, int