code: def test_keep_single_min():
      """Keep a single object (min) from among two"""
      labels = numpy.zeros((10, 10), int)
      labels[2:4, 3:5] = 1
      labels[6:9, 5:8] = 2
      expected = labels.copy()
      expected[labels == 1] = 0
      expected[labels == 2] = 1
      workspace, module = make_workspace({INPUT_OBJECTS: labels})
      module.x_name.value = INPUT_OBJECTS
      module.y_name.value = OUTPUT_OBJECTS
      module.measurements[0].measurement.value = TEST_FTR
      module.filter_choice.value = (
          cellprofiler.modules.filterobjects.FI_MINIMAL
      )
      m = workspace.measurements
      m.add_measurement(INPUT_OBJECTS, TEST_FTR, numpy.array([2, 1]))
      module.run(workspace)
      labels = workspace.object_set.get_objects(OUTPUT_OBJECTS)
      assert numpy.all(labels.segmented == expected)
      parents = m.get_current_measurement(
          OUTPUT_OBJECTS, FF_PARENT % INPUT_OBJECTS
      )
      assert len(parents) == 1
      assert parents[0] == 2
      assert (
          m.get_current_image_measurement(FF_COUNT % OUTPUT_OBJECTS)
          == 1
      )
      feature = FF_CHILDREN_COUNT % OUTPUT_OBJECTS
      child_count = m.get_current_measurement(INPUT_OBJECTS, feature)
      assert len(child_count) == 2
      assert child_count[0] == 0
      assert child_count[1] == 1
  
imports: import contextlib
  import io
  import os
  import pickle
  import tempfile
  import numpy
  import pytest
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.modules
  from cellprofiler_core.constants.measurement import FF_PARENT, FF_COUNT, FF_CHILDREN_COUNT, M_LOCATION_CENTER_X, M_LOCATION_CENTER_Y, M_LOCATION_CENTER_Z, M_NUMBER_OBJECT_NUMBER
  import cellprofiler.modules.filterobjects
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 6 for calling a global function with example usage: test_keep_single_min() without return types