code: def test_batch_sizes(self) -> None:
      batch_sizes = []
      for x, _y in self.dataloader:
          batch_sizes.append(x.shape[0])
  
      self.assertGreater(len(set(batch_sizes)), 1)
      self.assertAlmostEqual(
          np.mean(batch_sizes), self.batch_size, delta=2
      )
  
file_path: opacus/opacus/tests/poisson_test.py
imports: import unittest
  import numpy
  import torch
  from opacus.utils.uniform_sampler import UniformWithReplacementSampler
label_desc: Use image node_id 4 for calling the PoissonSamplingTest obj's underlying member method code with example usage: obj.test_batch_sizes() without return types