code: def test_cropping_2d(self, cropping, data_format, expected_ranges):
      if data_format == "channels_first":
          inputs = np.random.rand(3, 5, 7, 9)
          expected_output = ops.convert_to_tensor(
              inputs[
                  :,
                  :,
                  expected_ranges[0][0] : expected_ranges[0][1],
                  expected_ranges[1][0] : expected_ranges[1][1],
              ]
          )
      else:
          inputs = np.random.rand(3, 7, 9, 5)
          expected_output = ops.convert_to_tensor(
              inputs[
                  :,
                  expected_ranges[0][0] : expected_ranges[0][1],
                  expected_ranges[1][0] : expected_ranges[1][1],
                  :,
              ]
          )
  
      self.run_layer_test(
          layers.Cropping2D,
          init_kwargs={
              "cropping": cropping,
              "data_format": data_format,
          },
          input_data=inputs,
          expected_output=expected_output,
      )
  
file_path: keras/keras/layers/reshaping/cropping2d_test.py
imports: import numpy
  import pytest
  from absl.testing import parameterized
  from keras import backend
  from keras import layers
  from keras import ops
  from keras import testing
label_desc: Use image node_id 1 for calling the Cropping2DTest obj's underlying member method code with example usage: obj.test_cropping_2d(cropping, data_format, expected_ranges) without return types