code: def test_two_neighbors():
      olabels = numpy.zeros((20, 10), int)
      olabels[2, 2] = 1
      nlabels = numpy.zeros((20, 10), int)
      nlabels[5, 2] = 2
      nlabels[2, 6] = 1
      workspace, module = make_workspace(
          olabels,
          cellprofiler.modules.measureobjectneighbors.D_EXPAND,
          distance=20,
          neighbors_labels=nlabels,
      )
      assert isinstance(
          module,
          cellprofiler.modules.measureobjectneighbors.MeasureObjectNeighbors,
      )
      module.run(workspace)
      m = workspace.measurements
      assert isinstance(m, cellprofiler_core.measurement.Measurements)
      v = m.get_current_measurement(
          OBJECTS_NAME,
          module.get_measurement_name(
              cellprofiler.modules.measureobjectneighbors.M_FIRST_CLOSEST_OBJECT_NUMBER
          ),
      )
      assert len(v) == 1
      assert v[0] == 2
      v = m.get_current_measurement(
          OBJECTS_NAME,
          module.get_measurement_name(
              cellprofiler.modules.measureobjectneighbors.M_SECOND_CLOSEST_OBJECT_NUMBER
          ),
      )
      assert len(v) == 1
      assert v[0] == 1
      v = m.get_current_measurement(
          OBJECTS_NAME,
          module.get_measurement_name(
              cellprofiler.modules.measureobjectneighbors.M_FIRST_CLOSEST_DISTANCE
          ),
      )
      assert len(v) == 1
      assert round(abs(v[0] - 3), 7) == 0
      v = m.get_current_measurement(
          OBJECTS_NAME,
          module.get_measurement_name(
              cellprofiler.modules.measureobjectneighbors.M_SECOND_CLOSEST_DISTANCE
          ),
      )
      assert len(v) == 1
      assert round(abs(v[0] - 4), 7) == 0
      v = m.get_current_measurement(
          OBJECTS_NAME,
          module.get_measurement_name(
              cellprofiler.modules.measureobjectneighbors.M_ANGLE_BETWEEN_NEIGHBORS
          ),
      )
      assert len(v) == 1
      assert round(abs(v[0] - 90), 7) == 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 19 for calling a global function with example usage: test_two_neighbors() without return types