code: def make_workspace(image, data=None, write_mode="wb"):
      """Make a workspace to run the given image and params file
  
      image - a binary image
      data - the binary of the params file to run
      """
      if data is not None:
          with open(path, "wb") as fd:
              fd.write(data)
  
      pipeline = cellprofiler_core.pipeline.Pipeline()
  
      def callback(caller, event):
          assert not isinstance(
              event,
              (
                  cellprofiler_core.pipeline.event.RunException,
                  cellprofiler_core.pipeline.event.LoadException,
              ),
          )
  
      pipeline.add_listener(callback)
      module = cellprofiler.modules.untangleworms.UntangleWorms()
      module.image_name.value = IMAGE_NAME
      module.nonoverlapping_objects.value = NON_OVERLAPPING_OBJECTS_NAME
      module.overlap_objects.value = OVERLAP_OBJECTS_NAME
      module.set_module_num(1)
      pipeline.add_module(module)
      img = cellprofiler_core.image.Image(image)
      image_set_list = cellprofiler_core.image.ImageSetList()
      image_set = image_set_list.get_image_set(0)
      image_set.add(IMAGE_NAME, img)
      module.training_set_directory.dir_choice = (
          cellprofiler_core.preferences.ABSOLUTE_FOLDER_NAME
      )
      (
          module.training_set_directory.custom_path,
          module.training_set_file_name.value,
      ) = os.path.split(path)
  
      workspace = cellprofiler_core.workspace.Workspace(
          pipeline,
          module,
          image_set,
          cellprofiler_core.object.ObjectSet(),
          cellprofiler_core.measurement.Measurements(),
          image_set_list,
      )
      return workspace, module
  
imports: import base64
  import io
  import os
  import tempfile
  import zlib
  import imageio
  import centrosome.outline
  import numpy
  import scipy.ndimage
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.modules
  import cellprofiler.modules.untangleworms
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.setting
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 3 for calling a global function with example usage: make_workspace(image, data, write_mode) and returns: workspace,  module