code: def test_img_1566():
      """Regression test: different numbers of objects"""
      r = numpy.random.RandomState(1566)
      o0 = [
          numpy.array([1, 2, 3, 4, 5]),
          numpy.array([1, 1, 2, 2, 3]),
          numpy.array([1, 2, 4, 5]),
          numpy.array([1, 1, 1, 1]),
      ]
      o1 = [
          numpy.array([1, 1, 2, 2, 3]),
          numpy.array([1, 2, 3, 4, 5]),
          numpy.array([1, 1, 1, 1]),
          numpy.array([1, 2, 4, 5]),
      ]
      in0 = [
          numpy.array([0, 1, 2, 3, 4], float),
          numpy.array([2, 4, 8], float),
          numpy.array([0, 1, 2, 3, 4], float),
          numpy.array([5], float),
      ]
      in1 = [
          numpy.array([2, 4, 8], float),
          numpy.array([0, 1, 2, 3, 4], float),
          numpy.array([5], float),
          numpy.array([0, 1, 2, 3, 4], float),
      ]
  
      expected0 = [
          numpy.array([2, 3, 6, 7, 12]),
          numpy.array([2.5, 6.5, 12]),
          numpy.array([5, 6, numpy.nan, 8, 9]),
          numpy.array([7]),
      ]
      expected1 = [
          numpy.array([2.5, 6.5, 12]),
          numpy.array([2, 3, 6, 7, 12]),
          numpy.array([7]),
          numpy.array([5, 6, numpy.nan, 8, 9]),
      ]
      for oo0, oo1, ii0, ii1, e0, e1 in zip(
          o0, o1, in0, in1, expected0, expected1
      ):
          for flip in (False, True):
  
              def setup_fn(
                  module, workspace, oo0=oo0, oo1=oo1, flip=flip
              ):
                  m = workspace.measurements
                  assert isinstance(
                      m, cellprofiler_core.measurement.Measurements
                  )
                  if not flip:
                      m.add_relate_measurement(
                          1,
                          R_PARENT,
                          OBJECT[0],
                          OBJECT[1],
                          numpy.ones(len(oo0), int),
                          oo0,
                          numpy.ones(len(oo1), int),
                          oo1,
                      )
                  else:
                      m.add_relate_measurement(
                          1,
                          R_PARENT,
                          OBJECT[1],
                          OBJECT[0],
                          numpy.ones(len(oo0), int),
                          oo1,
                          numpy.ones(len(oo1), int),
                          oo0,
                      )
  
              measurements = run_workspace(
                  cellprofiler.modules.calculatemath.O_ADD,
                  False,
                  ii0,
                  False,
                  ii1,
                  setup_fn,
              )
              data = measurements.get_current_measurement(
                  OBJECT[0], MATH_OUTPUT_MEASUREMENTS
              )
              numpy.testing.assert_almost_equal(e0, data)
              data = measurements.get_current_measurement(
                  OBJECT[1], MATH_OUTPUT_MEASUREMENTS
              )
              numpy.testing.assert_almost_equal(e1, data)
  
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 22 for calling a global function with example usage: test_img_1566() without return types