code: def make_workspace(primary_labels, secondary_labels):
      """Make a workspace that has objects for the input labels
  
      returns a workspace with the following
          object_set - has object with name "primary" containing
                          the primary labels
                          has object with name "secondary" containing
                          the secondary labels
      """
      isl = cellprofiler_core.image.ImageSetList()
      module = (
          cellprofiler.modules.identifytertiaryobjects.IdentifyTertiarySubregion()
      )
      module.set_module_num(1)
      module.primary_objects_name.value = PRIMARY
      module.secondary_objects_name.value = SECONDARY
      module.subregion_objects_name.value = TERTIARY
      workspace = cellprofiler_core.workspace.Workspace(
          cellprofiler_core.pipeline.Pipeline(),
          module,
          isl.get_image_set(0),
          cellprofiler_core.object.ObjectSet(),
          cellprofiler_core.measurement.Measurements(),
          isl,
      )
      workspace.pipeline.add_module(module)
  
      for labels, name in (
          (primary_labels, PRIMARY),
          (secondary_labels, SECONDARY),
      ):
          objects = cellprofiler_core.object.Objects()
          objects.segmented = labels
          workspace.object_set.add_objects(objects, name)
      return workspace
  
imports: import numpy
  import six.moves
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.measurement
  import cellprofiler_core.modules
  from cellprofiler_core.constants.measurement import FF_COUNT, COLTYPE_INTEGER, M_LOCATION_CENTER_X, COLTYPE_FLOAT, M_LOCATION_CENTER_Y, M_NUMBER_OBJECT_NUMBER, FF_CHILDREN_COUNT, FF_PARENT, R_FIRST_IMAGE_NUMBER, R_SECOND_IMAGE_NUMBER, R_FIRST_OBJECT_NUMBER, R_SECOND_OBJECT_NUMBER
  import cellprofiler.modules.identifytertiaryobjects
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 2 for calling a global function with example usage: make_workspace(primary_labels, secondary_labels) and returns: workspace