code: def test_get_measurements():
      """Test the get_measurements function for some different cases"""
      module = (
          cellprofiler.modules.measurecolocalization.MeasureColocalization()
      )
      module.images_list.value = ", ".join((IMAGE1_NAME, IMAGE2_NAME))
      module.objects_list.value = OBJECTS_NAME
      module.images_or_objects.value = (
          cellprofiler.modules.measurecolocalization.M_IMAGES
      )
  
      def meas(name):
          ans = list(module.get_measurements(None, name, "Correlation"))
          ans.sort()
          if name == "Image":
              mf = all_image_measurement_formats
          else:
              mf = all_object_measurement_formats
          expected = sorted([_.split("_")[1] for _ in mf])
          return ans == expected
  
      assert meas("Image")
      assert not meas(OBJECTS_NAME)
      module.images_or_objects.value = (
          cellprofiler.modules.measurecolocalization.M_OBJECTS
      )
      assert not meas("Image")
      assert meas(OBJECTS_NAME)
      module.images_or_objects.value = (
          cellprofiler.modules.measurecolocalization.M_IMAGES_AND_OBJECTS
      )
      assert meas("Image")
      assert meas(OBJECTS_NAME)
  
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 5 for calling a global function with example usage: test_get_measurements() and returns: unknown