code: def run_workspace(
      operation,
      m1_is_image_measurement,
      m1_data,
      m2_is_image_measurement,
      m2_data,
      setup_fn=None,
  ):
      """Create and run a workspace, returning the measurements
  
      m<n>_is_image_measurement - true for an image measurement, false
                                  for object
      m<n>_data - either a single value or an array
      setup_fn - this gets called with the module before running
      """
      module = cellprofiler.modules.calculatemath.CalculateMath()
      module.operation.value = operation
      measurements = cellprofiler_core.measurement.Measurements()
      for i, operand, is_image_measurement, data in (
          (0, module.operands[0], m1_is_image_measurement, m1_data),
          (1, module.operands[1], m2_is_image_measurement, m2_data),
      ):
          measurement = "measurement%d" % i
          if is_image_measurement:
              operand.operand_choice.value = (
                  cellprofiler.modules.calculatemath.MC_IMAGE
              )
              measurements.add_image_measurement(measurement, data)
          else:
              operand.operand_choice.value = (
                  cellprofiler.modules.calculatemath.MC_OBJECT
              )
              operand.operand_objects.value = OBJECT[i]
              measurements.add_measurement(OBJECT[i], measurement, data)
          operand.operand_measurement.value = measurement
      module.output_feature_name.value = OUTPUT_MEASUREMENTS
      module.rounding.value = "Not rounded"
      module.rounding_digit.value = 0
      pipeline = cellprofiler_core.pipeline.Pipeline()
      image_set_list = cellprofiler_core.image.ImageSetList()
      workspace = cellprofiler_core.workspace.Workspace(
          pipeline,
          module,
          image_set_list.get_image_set(0),
          cellprofiler_core.object.ObjectSet(),
          measurements,
          image_set_list,
      )
      if setup_fn is not None:
          setup_fn(module, workspace)
      module.run(workspace)
      return measurements
  
imports: import numpy
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.measurement
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT, R_PARENT
  import cellprofiler.modules.calculatemath
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.workspace
label_desc: Use image node_id 1 for calling a global function with example usage: run_workspace(operation, m1_is_image_measurement, m1_data, m2_is_image_measurement, m2_data, setup_fn) and returns: measurements