code: def test_resize(self):
      image = np.random.randint(0, 256, (3, 224, 224))
  
      # Check the channel order is the same by default
      resized_image = resize(image, (30, 40))
      self.assertIsInstance(resized_image, np.ndarray)
      self.assertEqual(resized_image.shape, (3, 30, 40))
  
      # Check channel order is changed if specified
      resized_image = resize(
          image, (30, 40), data_format="channels_last"
      )
      self.assertIsInstance(resized_image, np.ndarray)
      self.assertEqual(resized_image.shape, (30, 40, 3))
  
      # Check PIL.Image.Image is returned if return_numpy=False
      resized_image = resize(image, (30, 40), return_numpy=False)
      self.assertIsInstance(resized_image, PIL.Image.Image)
      # PIL size is in (width, height) order
      self.assertEqual(resized_image.size, (40, 30))
  
      # Check an image with float values between 0-1 is returned with values in this range
      image = np.random.rand(3, 224, 224)
      resized_image = resize(image, (30, 40))
      self.assertIsInstance(resized_image, np.ndarray)
      self.assertEqual(resized_image.shape, (3, 30, 40))
      self.assertTrue(np.all(resized_image >= 0))
      self.assertTrue(np.all(resized_image <= 1))
  
      # Check that an image with 4 channels is resized correctly
      image = np.random.randint(0, 256, (4, 224, 224))
      resized_image = resize(
          image, (30, 40), input_data_format="channels_first"
      )
      self.assertIsInstance(resized_image, np.ndarray)
      self.assertEqual(resized_image.shape, (4, 30, 40))
  
imports: import unittest
  import numpy
  from parameterized import parameterized
  from transformers.testing_utils import require_flax, require_tf, require_torch, require_vision
  from transformers.utils.import_utils import is_flax_available, is_tf_available, is_torch_available, is_vision_available
label_desc: Use image node_id 9 for calling the ImageTransformsTester obj's underlying member method code with example usage: obj.test_resize() without return types