code: def test_do_not_shrink_identical():
      """Test a case where the primary and secondary objects are identical"""
      primary_labels = numpy.zeros((20, 20), int)
      secondary_labels = numpy.zeros((20, 20), int)
      expected_labels = numpy.zeros((20, 20), int)
  
      # first and third objects have different sizes
      primary_labels[3:6, 4:7] = 1
      secondary_labels[2:7, 3:8] = 1
      expected_labels[2:7, 3:8] = 1
      expected_labels[3:6, 4:7] = 0
  
      primary_labels[13:16, 4:7] = 3
      secondary_labels[12:17, 3:8] = 3
      expected_labels[12:17, 3:8] = 3
      expected_labels[13:16, 4:7] = 0
  
      # second object and fourth have same size
  
      primary_labels[3:6, 14:17] = 2
      secondary_labels[3:6, 14:17] = 2
      primary_labels[13:16, 14:17] = 4
      secondary_labels[13:16, 14:17] = 4
      workspace = make_workspace(primary_labels, secondary_labels)
  
      module = workspace.module
      module.shrink_primary.value = False
      module.run(workspace)
      output_objects = workspace.object_set.get_objects(TERTIARY)
      assert numpy.all(output_objects.segmented == expected_labels)
  
      measurements = workspace.measurements
      count_feature = "Count_%s" % TERTIARY
      value = measurements.get_current_measurement(
          "Image", count_feature
      )
      assert value == 3
  
      child_count_feature = "Children_%s_Count" % TERTIARY
      for parent_name in PRIMARY, SECONDARY:
          parent_of_feature = "Parent_%s" % parent_name
          parent_of = measurements.get_current_measurement(
              TERTIARY, parent_of_feature
          )
          child_count = measurements.get_current_measurement(
              parent_name, child_count_feature
          )
          for parent, expected_child_count in (
              (1, 1),
              (2, 0),
              (3, 1),
              (4, 0),
          ):
              assert child_count[parent - 1] == expected_child_count
          for child in (1, 3):
              assert parent_of[child - 1] == child
  
      for location_feature in (
          M_LOCATION_CENTER_X,
          M_LOCATION_CENTER_Y,
      ):
          values = measurements.get_current_measurement(
              TERTIARY, location_feature
          )
          assert numpy.all(numpy.isnan(values) == [False, True, False])
  
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 10 for calling a global function with example usage: test_do_not_shrink_identical() without return types