code: def test_batch_sync_random_resize(self):
      processor = DetDataPreprocessor(
          batch_augments=[
              dict(
                  type="BatchSyncRandomResize",
                  random_size_range=(320, 320),
                  size_divisor=32,
                  interval=1,
              )
          ]
      )
      self.assertTrue(
          isinstance(processor.batch_augments[0], BatchSyncRandomResize)
      )
      message_hub = MessageHub.get_instance(
          "test_batch_sync_random_resize"
      )
      message_hub.update_info("iter", 0)
      packed_inputs = demo_mm_inputs(
          2, [[3, 128, 128], [3, 128, 128]], use_box_type=True
      )
      batch_inputs = processor(packed_inputs, training=True)["inputs"]
      self.assertEqual(batch_inputs.shape, (2, 3, 128, 128))
  
      # resize after one iter
      message_hub.update_info("iter", 1)
      packed_inputs = demo_mm_inputs(
          2, [[3, 128, 128], [3, 128, 128]], use_box_type=True
      )
      batch_inputs = processor(packed_inputs, training=True)["inputs"]
      self.assertEqual(batch_inputs.shape, (2, 3, 320, 320))
  
      packed_inputs = demo_mm_inputs(
          2, [[3, 128, 128], [3, 128, 128]], use_box_type=True
      )
      batch_inputs = processor(packed_inputs, training=False)["inputs"]
      self.assertEqual(batch_inputs.shape, (2, 3, 128, 128))
  
file_path: mmdetection/tests/test_models/test_data_preprocessors/test_data_preprocessor.py
imports: from unittest import TestCase
  import torch
  from mmengine.logging import MessageHub
  from mmdet.models.data_preprocessors import BatchFixedSizePad, BatchSyncRandomResize, DetDataPreprocessor, MultiBranchDataPreprocessor
  from mmdet.structures import DetDataSample
  from mmdet.testing import demo_mm_inputs
label_desc: Use image node_id 4 for calling the TestDetDataPreprocessor obj's underlying member method code with example usage: obj.test_batch_sync_random_resize() without return types