code: def make_workspace(labels):
      image_set_list = cellprofiler_core.image.ImageSetList()
      image_set = image_set_list.get_image_set(0)
      object_set = cellprofiler_core.object.ObjectSet()
      objects = cellprofiler_core.object.Objects()
      objects.segmented = labels
      object_set.add_objects(objects, OBJECTS_NAME)
      m = cellprofiler_core.measurement.Measurements()
      module = (
          cellprofiler.modules.measureobjectsizeshape.MeasureObjectAreaShape()
      )
      module.set_module_num(1)
      module.objects_list.value = OBJECTS_NAME
      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)
      workspace = cellprofiler_core.workspace.Workspace(
          pipeline, module, image_set, object_set, m, image_set_list
      )
      return workspace, module
  
imports: import io
  import os
  import numpy
  import skimage.io
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.modules.injectimage
  import cellprofiler.modules.measureobjectsizeshape
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.workspace
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  import tests.frontend
  import tests.frontend.modules
label_desc: Use image node_id 1 for calling a global function with example usage: make_workspace(labels) and returns: workspace,  module