code: def test_upsampling_2d_correctness(self):
      input_shape = (2, 2, 1, 3)
      x = np.arange(np.prod(input_shape)).reshape(input_shape)
      expected_output = np.array(
          # fmt: off
              [[[[ 0.,  1.,  2.],
                 [ 0.,  1.,  2.]],
                [[ 3.,  4.,  5.],
                 [ 3.,  4.,  5.]]],
               [[[ 6.,  7.,  8.],
                 [ 6.,  7.,  8.]],
                [[ 9., 10., 11.],
                 [ 9., 10., 11.]]]]
          # fmt: on
      )
      if backend.config.image_data_format() == "channels_first":
          expected_output = expected_output.transpose((0, 3, 1, 2))
          x = x.transpose((0, 3, 1, 2))
      self.assertAllClose(
          layers.UpSampling2D(size=(1, 2))(x), expected_output
      )
  
file_path: keras/keras/layers/reshaping/up_sampling2d_test.py
imports: import numpy
  import pytest
  from absl.testing import parameterized
  from keras import backend
  from keras import layers
  from keras import testing
label_desc: Use image node_id 3 for calling the UpSampling2dTest obj's underlying member method code with example usage: obj.test_upsampling_2d_correctness() without return types