code: def test_center_crop_correctness(self, size, data_format):
      # batched case
      if data_format == "channels_first":
          img = np.random.random((2, 3, 9, 11))
      else:
          img = np.random.random((2, 9, 11, 3))
      out = layers.CenterCrop(
          size[0],
          size[1],
          data_format=data_format,
      )(img)
      if data_format == "channels_first":
          img_transpose = np.transpose(img, (0, 2, 3, 1))
  
          ref_out = np.transpose(
              self.np_center_crop(img_transpose, size[0], size[1]),
              (0, 3, 1, 2),
          )
      else:
          ref_out = self.np_center_crop(img, size[0], size[1])
      self.assertAllClose(ref_out, out)
  
      # unbatched case
      if data_format == "channels_first":
          img = np.random.random((3, 9, 11))
      else:
          img = np.random.random((9, 11, 3))
      out = layers.CenterCrop(
          size[0],
          size[1],
          data_format=data_format,
      )(img)
      if data_format == "channels_first":
          img_transpose = np.transpose(img, (1, 2, 0))
          ref_out = np.transpose(
              self.np_center_crop(
                  img_transpose,
                  size[0],
                  size[1],
              ),
              (2, 0, 1),
          )
      else:
          ref_out = self.np_center_crop(
              img,
              size[0],
              size[1],
          )
      self.assertAllClose(ref_out, out)
  
file_path: keras/keras/layers/preprocessing/center_crop_test.py
imports: import numpy
  import pytest
  from absl.testing import parameterized
  from tensorflow import data
  from keras import backend
  from keras import layers
  from keras import testing
label_desc: Use image node_id 3 for calling the CenterCropTest obj's underlying member method code with example usage: obj.test_center_crop_correctness(size, data_format) without return types