code: def test_upsampling_3d_correctness(self):
      input_shape = (2, 1, 2, 1, 3)
      x = np.arange(np.prod(input_shape)).reshape(input_shape)
      expected_output = np.array(
          [
              [
                  [
                      [[0.0, 1.0, 2.0], [0.0, 1.0, 2.0]],
                      [[0.0, 1.0, 2.0], [0.0, 1.0, 2.0]],
                      [[3.0, 4.0, 5.0], [3.0, 4.0, 5.0]],
                      [[3.0, 4.0, 5.0], [3.0, 4.0, 5.0]],
                  ],
                  [
                      [[0.0, 1.0, 2.0], [0.0, 1.0, 2.0]],
                      [[0.0, 1.0, 2.0], [0.0, 1.0, 2.0]],
                      [[3.0, 4.0, 5.0], [3.0, 4.0, 5.0]],
                      [[3.0, 4.0, 5.0], [3.0, 4.0, 5.0]],
                  ],
              ],
              [
                  [
                      [[6.0, 7.0, 8.0], [6.0, 7.0, 8.0]],
                      [[6.0, 7.0, 8.0], [6.0, 7.0, 8.0]],
                      [[9.0, 10.0, 11.0], [9.0, 10.0, 11.0]],
                      [[9.0, 10.0, 11.0], [9.0, 10.0, 11.0]],
                  ],
                  [
                      [[6.0, 7.0, 8.0], [6.0, 7.0, 8.0]],
                      [[6.0, 7.0, 8.0], [6.0, 7.0, 8.0]],
                      [[9.0, 10.0, 11.0], [9.0, 10.0, 11.0]],
                      [[9.0, 10.0, 11.0], [9.0, 10.0, 11.0]],
                  ],
              ],
          ]
      )
      if backend.config.image_data_format() == "channels_first":
          expected_output = expected_output.transpose((0, 4, 1, 2, 3))
          x = x.transpose((0, 4, 1, 2, 3))
      self.assertAllClose(
          layers.UpSampling3D(size=(2, 2, 2))(x), expected_output
      )
  
file_path: keras/keras/layers/reshaping/up_sampling3d_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 2 for calling the UpSampling3dTest obj's underlying member method code with example usage: obj.test_upsampling_3d_correctness() without return types