code: def test_touching_discarded():
      """Make sure that we count edge-touching discarded objects
  
      Regression test of IMG-1012.
      """
      labels = numpy.zeros((10, 10), int)
      labels[2, 3] = 1
      workspace, module = make_workspace(
          labels,
          cellprofiler.modules.measureobjectneighbors.D_ADJACENT,
          5,
      )
      object_set = workspace.object_set
      assert isinstance(object_set, cellprofiler_core.object.ObjectSet)
      objects = object_set.get_objects(OBJECTS_NAME)
      assert isinstance(objects, cellprofiler_core.object.Objects)
  
      sm_labels = labels.copy() * 3
      sm_labels[-1, -1] = 1
      sm_labels[0:2, 3] = 2
      objects.small_removed_segmented = sm_labels
      module.run(workspace)
      m = workspace.measurements
      neighbors = m.get_current_measurement(
          OBJECTS_NAME, "Neighbors_NumberOfNeighbors_Adjacent"
      )
      assert len(neighbors) == 1
      assert numpy.all(neighbors == 1)
      pct = m.get_current_measurement(
          OBJECTS_NAME, "Neighbors_PercentTouching_Adjacent"
      )
      assert len(pct) == 1
      assert round(abs(pct[0] - 100), 7) == 0
      fo = m.get_current_measurement(
          OBJECTS_NAME, "Neighbors_FirstClosestObjectNumber_Adjacent"
      )
      assert len(fo) == 1
      assert fo[0] == 0
  
      angle = m.get_current_measurement(
          OBJECTS_NAME, "Neighbors_AngleBetweenNeighbors_Adjacent"
      )
      assert len(angle) == 1
      assert not numpy.isnan(angle)[0]
  
imports: import numpy
  import six.moves
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  from cellprofiler_core.constants.measurement import COLTYPE_INTEGER, COLTYPE_FLOAT, NEIGHBORS, R_FIRST_OBJECT_NUMBER, R_SECOND_OBJECT_NUMBER
  from cellprofiler_core.measurement import RelationshipKey
  import cellprofiler.modules.measureobjectneighbors
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 11 for calling a global function with example usage: test_touching_discarded() without return types