class_docstr: `BucketizeBatchSampler` wrapper that distributes across each processor.
  
  Args:
      batch_sampler (BucketizeBatchSampler): the initialized bucketize batch sampler.
      num_replicas (int, optional): Number of processes participating in
          distributed training. By default, :attr:`world_size` is retrieved from the
          current distributed group.
      rank (int, optional): Rank of the current process within :attr:`num_replicas`.
          By default, :attr:`rank` is retrieved from the current distributed
          group.
      shuffle (bool, optional): if ``True``, the list of batch indices will be shuffled.
          (Default: ``True``)
      seed (int, optional): random seed used to shuffle the batch_sampler if
          :attr:`shuffle=True`. This number should be identical across all
          processes in the distributed group. (Default: ``0``)
      drop_last (bool, optional): if ``True``, then the sampler will drop the
          tail of the data to make it evenly divisible across the number of
          replicas. If ``False``, the sampler will add extra indices to make
          the data evenly divisible across the replicas. (Default: ``False``)
  
  Note:
      if ``shuffle`` is True, it will only shuffle the data once. Please set ``reload_dataloaders_every_n_epochs=1``
      in pytorch_lightning Trainer, and set `sampler.set_epoch(self.current_epoch)` before DataLoader initialization
      in `train_dataloader` method to enable shuffling every epoch.
code: def __iter__(self):
      if self.shuffle:
          g = torch.Generator()
          g.manual_seed(self.seed + self.epoch)
          perm = torch.randperm(
              len(self.batch_sampler.iter_list), generator=g
          ).tolist()
          indices = [self.batch_sampler.iter_list[i] for i in perm]
      else:
          indices = self.batch_sampler.iter_list
      if self.drop_last:
          self.total_size = (
              len(indices) - len(indices) % self.num_replicas
          )
      else:
          padding_size = (
              self.num_replicas - len(indices) % self.num_replicas
          )
          indices += indices[:padding_size]
          self.total_size = len(indices)
      self.num_samples = self.total_size // self.num_replicas
      self.subset = indices[
          self.rank : self.total_size : self.num_replicas
      ]
      assert len(self.subset) == self.num_samples
  
      return iter(self.subset)
  
imports: import math
  from pathlib import Path
  from typing import Dict, Iterator, List, Optional, Tuple, Union
  import numpy
  import torch
  import torch.distributed
  import torchaudio
  from torch import Tensor
  from torch.utils.data import BatchSampler, Dataset, DistributedSampler
  from ..lightning_modules import Batch
label_desc: Use image node_id 2 for calling the DistributedBatchSampler obj's underlying member method code with example usage: obj.__iter__() and returns: iter