code: def test_random_expand(self):
      img = np.random.uniform(-1, 1, size=(3, 64, 32))
  
      out = random_expand(img)
  
      out = random_expand(img, max_ratio=1)
      np.testing.assert_equal(out, img)
  
      out, param = random_expand(
          img, max_ratio=self.max_ratio, return_param=True
      )
      ratio = param["ratio"]
      y_offset = param["y_offset"]
      x_offset = param["x_offset"]
      np.testing.assert_equal(
          out[:, y_offset : y_offset + 64, x_offset : x_offset + 32],
          img,
      )
      self.assertGreaterEqual(ratio, 1)
      self.assertLessEqual(ratio, self.max_ratio)
      self.assertEqual(out.shape[1], int(64 * ratio))
      self.assertEqual(out.shape[2], int(32 * ratio))
  
      out = random_expand(img, max_ratio=2)
  
file_path: chainercv/tests/transforms_tests/image_tests/test_random_expand.py
imports: import unittest
  import numpy
  from chainercv.transforms import random_expand
  from chainercv.utils import testing
label_desc: Use image node_id 1 for calling the TestRandomExpand obj's underlying member method code with example usage: obj.test_random_expand() without return types