code: def test_discard_mask_objects():
      """Test discarding objects that touch the mask of objects parent img"""
      mask = numpy.ones((10, 10), bool)
      mask[5, 5] = False
      labels = numpy.zeros((10, 10), int)
      labels[1:4, 1:4] = 1
      labels[5:8, 5:8] = 2
      expected = labels.copy()
      expected[expected == 2] = 0
  
      workspace, module = make_workspace({})
      parent_image = cellprofiler_core.image.Image(
          numpy.zeros((10, 10)), mask=mask
      )
      workspace.image_set.add(INPUT_IMAGE, parent_image)
  
      input_objects = cellprofiler_core.object.Objects()
      input_objects.segmented = labels
      input_objects.parent_image = parent_image
  
      workspace.object_set.add_objects(input_objects, INPUT_OBJECTS)
  
      module.x_name.value = INPUT_OBJECTS
      module.y_name.value = OUTPUT_OBJECTS
      module.mode.value = cellprofiler.modules.filterobjects.MODE_BORDER
      module.run(workspace)
      output_objects = workspace.object_set.get_objects(OUTPUT_OBJECTS)
      assert numpy.all(expected == output_objects.segmented)
  
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 26 for calling a global function with example usage: test_discard_mask_objects() without return types