code: def make_workspace(image1, image2, objects=None):
      """Make a workspace for testing Threshold"""
      module = (
          cellprofiler.modules.measurecolocalization.MeasureColocalization()
      )
      image_set_list = cellprofiler_core.image.ImageSetList()
      image_set = image_set_list.get_image_set(0)
      module.images_list.value = ", ".join((IMAGE1_NAME, IMAGE2_NAME))
      for image_name, name, image in zip(
          module.images_list.value,
          (IMAGE1_NAME, IMAGE2_NAME),
          (image1, image2),
      ):
          image_set.add(name, image)
      object_set = cellprofiler_core.object.ObjectSet()
      if objects is None:
          module.images_or_objects.value = (
              cellprofiler.modules.measurecolocalization.M_IMAGES
          )
      else:
          module.images_or_objects.value = (
              cellprofiler.modules.measurecolocalization.M_IMAGES_AND_OBJECTS
          )
          module.objects_list.value = OBJECTS_NAME
          object_set.add_objects(objects, OBJECTS_NAME)
      pipeline = cellprofiler_core.pipeline.Pipeline()
      workspace = cellprofiler_core.workspace.Workspace(
          pipeline,
          module,
          image_set,
          object_set,
          cellprofiler_core.measurement.Measurements(),
          image_set_list,
      )
      return workspace, module
  
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 1 for calling a global function with example usage: make_workspace(image1, image2, objects) and returns: workspace,  module