code: def test_two_objects():
      """Test creation of two tertiary objects"""
      primary_labels = numpy.zeros((10, 20), int)
      secondary_labels = numpy.zeros((10, 20), int)
      expected_primary_parents = numpy.zeros((10, 20), int)
      expected_secondary_parents = numpy.zeros((10, 20), int)
      centers = ((4, 5, 1, 2), (4, 15, 2, 1))
      for x, y, primary_label, secondary_label in centers:
          primary_labels[x - 1 : x + 2, y - 1 : y + 2] = primary_label
          secondary_labels[
              x - 2 : x + 3, y - 2 : y + 3
          ] = secondary_label
          expected_primary_parents[
              x - 2 : x + 3, y - 2 : y + 3
          ] = primary_label
          expected_primary_parents[x, y] = 0
          expected_secondary_parents[
              x - 2 : x + 3, y - 2 : y + 3
          ] = secondary_label
          expected_secondary_parents[x, y] = 0
  
      workspace = make_workspace(primary_labels, secondary_labels)
      module = workspace.module
      module.run(workspace)
      measurements = workspace.measurements
      count_feature = "Count_%s" % TERTIARY
      value = measurements.get_current_measurement(
          "Image", count_feature
      )
      assert value == 2
  
      child_count_feature = "Children_%s_Count" % TERTIARY
      output_labels = workspace.object_set.get_objects(
          TERTIARY
      ).segmented
      for parent_name, idx, parent_labels in (
          (PRIMARY, 2, expected_primary_parents),
          (SECONDARY, 3, expected_secondary_parents),
      ):
          parents_of_feature = "Parent_%s" % parent_name
          cvalue = measurements.get_current_measurement(
              parent_name, child_count_feature
          )
          assert numpy.all(cvalue == 1)
          pvalue = measurements.get_current_measurement(
              TERTIARY, parents_of_feature
          )
          for value in (pvalue, cvalue):
              assert numpy.product(value.shape), 2
          #
          # Make an array that maps the parent label index to the
          # corresponding child label index
          #
          label_map = numpy.zeros((len(centers) + 1,), int)
          for center in centers:
              label = center[idx]
              label_map[label] = pvalue[center[idx] - 1]
          expected_labels = label_map[parent_labels]
          assert numpy.all(expected_labels == output_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 5 for calling a global function with example usage: test_two_objects() without return types