code: def setUp(self, mock):
      self.length = 100
      self.dataset = DummyDataset(self.length)
      self.sampler = DefaultSampler(self.dataset, shuffle=False)
  
file_path: mmdetection/tests/test_datasets/test_samplers/test_batch_sampler.py
imports: from unittest import TestCase
  from unittest.mock import patch
  import numpy
  from mmengine.dataset import DefaultSampler
  from torch.utils.data import Dataset
  from mmdet.datasets.samplers import AspectRatioBatchSampler
label_desc: Use image node_id 1 for calling the TestAspectRatioBatchSampler obj's underlying member method code with example usage: obj.setUp(mock) without return types