code: def test_resize_by_dimensions_shrink_image_labels(
      image_labels,
      module,
      object_set_empty,
      objects_empty,
      workspace_empty,
  ):
      objects_empty.segmented = image_labels
  
      module.x_name.value = "InputObjects"
  
      module.method.value = "Dimensions"
  
      module.width.value = 5
  
      module.height.value = 10
  
      module.run(workspace_empty)
  
      expected_labels = numpy.zeros((10, 5), dtype=numpy.uint8)
  
      expected_labels[1:4, 1:2] = 1
  
      expected_labels[0:4, 3:4] = 2
  
      expected_labels[6:9, 0:2] = 3
  
      expected_labels[6:10, 3:5] = 4
  
      numpy.testing.assert_array_equal(
          object_set_empty.get_objects("ResizeObjects").segmented,
          expected_labels,
      )
  
      numpy.testing.assert_array_equal(
          workspace_empty.measurements.get_current_measurement(
              "InputObjects",
              FF_CHILDREN_COUNT % "ResizeObjects",
          ),
          [1, 1, 1, 1],
      )
  
      numpy.testing.assert_array_equal(
          workspace_empty.measurements.get_current_measurement(
              "ResizeObjects", FF_PARENT % "InputObjects"
          ),
          [1, 2, 3, 4],
      )
  
imports: import numpy
  import numpy.testing
  import pytest
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  from cellprofiler_core.constants.measurement import FF_CHILDREN_COUNT, FF_PARENT
  import cellprofiler.modules.resizeobjects
  import cellprofiler_core.object
label_desc: Use image node_id 5 for calling a global function with example usage: test_resize_by_dimensions_shrink_image_labels(image_labels, module, object_set_empty, objects_empty, workspace_empty) without return types