code: def test_keep_removed_volume():
      labels = numpy.zeros((2, 10, 20), int)
      labels[:, 2, 4] = 1
      labels[:, 4:6, 8:15] = 2
      labels[:, 8, 15] = 3
  
      expected = numpy.zeros_like(labels)
      expected[labels == 2] = 1
  
      expected_removed = numpy.zeros_like(labels)
      expected_removed[labels == 1] = 1
      expected_removed[labels == 3] = 2
  
      workspace, module = make_workspace({INPUT_OBJECTS: labels})
  
      module.x_name.value = INPUT_OBJECTS
      module.y_name.value = OUTPUT_OBJECTS
      module.keep_removed_objects.value = True
      module.removed_objects_name.value = "RemovedObjects"
      module.measurements[0].measurement.value = TEST_FTR
      module.filter_choice.value = (
          cellprofiler.modules.filterobjects.FI_MAXIMAL
      )
  
      m = workspace.measurements
  
      m.add_measurement(INPUT_OBJECTS, TEST_FTR, numpy.array([1, 4, 2]))
  
      module.run(workspace)
  
      labels = workspace.object_set.get_objects(OUTPUT_OBJECTS)
  
      removed_labels = workspace.object_set.get_objects(
          "RemovedObjects"
      )
  
      assert numpy.all(labels.segmented == expected)
  
      assert numpy.all(removed_labels.segmented == expected_removed)
  
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 41 for calling a global function with example usage: test_keep_removed_volume() without return types