code: def test_test_measure_overlap_no_objects():
      # Regression test of issue #934 - no objects
      workspace, module = make_obj_workspace(
          numpy.zeros((0, 3), int),
          numpy.zeros((0, 3), int),
          dict(image=numpy.zeros((20, 10), bool)),
          dict(image=numpy.zeros((20, 10), bool)),
      )
      module.run(workspace)
      m = workspace.measurements
      for feature in cellprofiler.modules.measureobjectoverlap.FTR_ALL:
          mname = module.measurement_name(feature)
          value = m["Image", mname, 1]
          if (
              feature
              == cellprofiler.modules.measureobjectoverlap.FTR_TRUE_NEG_RATE
          ):
              assert value == 1
          elif (
              feature
              == cellprofiler.modules.measureobjectoverlap.FTR_FALSE_POS_RATE
          ):
              assert value == 0
          else:
              assert numpy.isnan(value), "%s was %f. not nan" % (
                  mname,
                  value,
              )
      #
      # Make sure they don't crash
      #
      workspace, module = make_obj_workspace(
          numpy.zeros((0, 3), int),
          numpy.ones((1, 3), int),
          dict(image=numpy.zeros((20, 10), bool)),
          dict(image=numpy.zeros((20, 10), bool)),
      )
      module.run(workspace)
      workspace, module = make_obj_workspace(
          numpy.ones((1, 3), int),
          numpy.zeros((0, 3), int),
          dict(image=numpy.zeros((20, 10), bool)),
          dict(image=numpy.zeros((20, 10), bool)),
      )
      module.run(workspace)
  
file_path: CellProfiler/tests/frontend/modules/test_measureobjectoverlap.py
imports: import numpy
  import numpy.random
  import scipy.ndimage
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.module
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  import cellprofiler.modules.measureobjectoverlap
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.workspace
label_desc: Use image node_id 4 for calling a global function with example usage: test_test_measure_overlap_no_objects() without return types