code: def make_obj_workspace(ground_truth_obj, id_obj, ground_truth, id):
      """make a workspace to test comparing objects"""
      """ ground truth object and ID object  are dictionaires w/ the following keys"""
      """i - i component of pixel coordinates
      j - j component of pixel coordinates
      l - label """
  
      module = (
          cellprofiler.modules.measureobjectoverlap.MeasureObjectOverlap()
      )
      module.set_module_num(1)
      module.object_name_GT.value = GROUND_TRUTH_OBJ
      module.object_name_ID.value = ID_OBJ
      module.wants_emd.value = True
      pipeline = cellprofiler_core.pipeline.Pipeline()
  
      def callback(caller, event):
          assert not isinstance(
              event, cellprofiler_core.pipeline.event.RunException
          )
  
      pipeline.add_listener(callback)
      pipeline.add_module(module)
      image_set_list = cellprofiler_core.image.ImageSetList()
      image_set = image_set_list.get_image_set(0)
  
      for name, d in (
          (GROUND_TRUTH_OBJ_IMAGE_NAME, ground_truth),
          (ID_OBJ_IMAGE_NAME, id),
      ):
          image = cellprofiler_core.image.Image(
              d["image"],
              mask=d.get("mask"),
              crop_mask=d.get("crop_mask"),
          )
          image_set.add(name, image)
      object_set = cellprofiler_core.object.ObjectSet()
      for name, d in (
          (GROUND_TRUTH_OBJ, ground_truth_obj),
          (ID_OBJ, id_obj),
      ):
          object = cellprofiler_core.object.Objects()
          if d.shape[1] == 3:
              object.ijv = d
          else:
              object.segmented = d
          object_set.add_objects(object, name)
      workspace = cellprofiler_core.workspace.Workspace(
          pipeline,
          module,
          image_set,
          object_set,
          cellprofiler_core.measurement.Measurements(),
          image_set_list,
      )
      return workspace, module
  
file_path: CellProfiler/tests/frontend/modules/test_measureobjectoverlap.py
imports: import numpy
  import numpy.random
  import scipy.ndimage
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.module
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  import cellprofiler.modules.measureobjectoverlap
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.workspace
label_desc: Use image node_id 1 for calling a global function with example usage: make_obj_workspace(ground_truth_obj, id_obj, ground_truth, id) and returns: workspace,  module