code: def test_detector_utils(
      self, input_param, input_shape, expected_shape
  ):
      size_divisible = (
          32 * ensure_tuple(input_param["conv1_t_stride"])[0]
      )
      input_data = torch.randn(input_shape)
      result, _ = preprocess_images(
          input_data,
          input_param["spatial_dims"],
          size_divisible,
          mode="constant",
          value=1,
      )
      assert_allclose(
          expected_shape,
          result.shape,
          type_test=True,
          device_test=False,
          atol=0.1,
      )
  
      input_data = [
          torch.randn(input_shape[1:])
          for _ in range(random.randint(1, 9))
      ]
      result, _ = preprocess_images(
          input_data,
          input_param["spatial_dims"],
          size_divisible,
          mode="edge",
      )
      expected_shape = (len(input_data),) + expected_shape[1:]
      assert_allclose(
          expected_shape,
          result.shape,
          type_test=True,
          device_test=False,
          atol=0.1,
      )
  
file_path: MONAI/tests/test_detector_utils.py
imports: from __future__ import annotations
  import random
  import unittest
  import torch
  from parameterized import parameterized
  from monai.apps.detection.utils.detector_utils import preprocess_images
  from monai.utils import ensure_tuple
  from tests.utils import assert_allclose
label_desc: Use image node_id 1 for calling the TestDetectorUtils obj's underlying member method code with example usage: obj.test_detector_utils(input_param, input_shape, expected_shape) without return types