code: def test_cropped_objects():
      """Test images and objects with a cropping mask"""
      numpy.random.seed(0)
      image1 = numpy.random.uniform(size=(20, 20))
      i1 = cellprofiler_core.image.Image(image1)
      crop_mask = numpy.zeros((20, 20), bool)
      crop_mask[5:15, 5:15] = True
      i2 = cellprofiler_core.image.Image(
          image1[5:15, 5:15], crop_mask=crop_mask
      )
      labels = numpy.zeros((10, 10), int)
      labels[:4, :4] = 1
      labels[6:, 6:] = 2
      o = cellprofiler_core.object.Objects()
      o.segmented = labels
      #
      # Make the objects have the cropped image as a parent
      #
      o.parent_image = i2
      workspace, module = make_workspace(i1, i2, o)
      module.run(workspace)
      m = workspace.measurements
      mi = module.get_measurement_images(
          None, OBJECTS_NAME, "Correlation", "Correlation"
      )
      corr = m.get_current_measurement(
          OBJECTS_NAME, "Correlation_Correlation_%s" % mi[0]
      )
      assert round(abs(corr[0] - 1), 7) == 0
      assert round(abs(corr[1] - 1), 7) == 0
  
imports: import numpy
  import six.moves
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  import cellprofiler.modules.measurecolocalization
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 16 for calling a global function with example usage: test_cropped_objects() without return types