code: def test_overlapping_secondary():
      """Make sure that an overlapping tertiary is assigned to the larger parent"""
      expected_primary_parents = numpy.zeros((10, 20), int)
      expected_secondary_parents = numpy.zeros((10, 20), int)
      primary_labels = numpy.zeros((10, 20), int)
      secondary_labels = numpy.zeros((10, 20), int)
      primary_labels[3:6, 3:10] = 2
      primary_labels[3:6, 10:17] = 1
      secondary_labels[2:7, 2:12] = 1
      expected_primary_parents[2:7, 2:12] = 2
      expected_primary_parents[4, 4:12] = 0  # the middle of the primary
      expected_primary_parents[4, 9] = 2  # the outline of primary # 2
      expected_primary_parents[4, 10] = 2  # the outline of primary # 1
      expected_secondary_parents[expected_primary_parents > 0] = 1
      workspace = make_workspace(primary_labels, secondary_labels)
      module = workspace.module
      assert isinstance(
          module,
          cellprofiler.modules.identifytertiaryobjects.IdentifyTertiarySubregion,
      )
      module.run(workspace)
      measurements = workspace.measurements
      output_labels = workspace.object_set.get_objects(
          TERTIARY
      ).segmented
      for parent_name, parent_labels in (
          (PRIMARY, expected_primary_parents),
          (SECONDARY, expected_secondary_parents),
      ):
          parents_of_feature = "Parent_%s" % parent_name
          pvalue = measurements.get_current_measurement(
              TERTIARY, parents_of_feature
          )
          label_map = numpy.zeros(
              (numpy.product(pvalue.shape) + 1,), int
          )
          label_map[1:] = pvalue.flatten()
          mapped_labels = label_map[output_labels]
          assert numpy.all(parent_labels == mapped_labels)
  
imports: import numpy
  import six.moves
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.measurement
  import cellprofiler_core.modules
  from cellprofiler_core.constants.measurement import FF_COUNT, COLTYPE_INTEGER, M_LOCATION_CENTER_X, COLTYPE_FLOAT, M_LOCATION_CENTER_Y, M_NUMBER_OBJECT_NUMBER, FF_CHILDREN_COUNT, FF_PARENT, R_FIRST_IMAGE_NUMBER, R_SECOND_IMAGE_NUMBER, R_FIRST_OBJECT_NUMBER, R_SECOND_OBJECT_NUMBER
  import cellprofiler.modules.identifytertiaryobjects
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 6 for calling a global function with example usage: test_overlapping_secondary() without return types