code: def test_measurements_no_new_primary():
      module = (
          cellprofiler.modules.identifysecondaryobjects.IdentifySecondaryObjects()
      )
      for discard_edge in (True, False):
          module.wants_discard_edge.value = discard_edge
          module.wants_discard_primary.value = False
          module.x_name.value = INPUT_OBJECTS_NAME
          module.y_name.value = OUTPUT_OBJECTS_NAME
          module.new_primary_objects_name.value = NEW_OBJECTS_NAME
  
          categories = module.get_categories(None, "Image")
          assert len(categories) == 2
          assert all(
              [
                  any([x == y for x in categories])
                  for y in ("Count", "Threshold")
              ]
          )
          categories = module.get_categories(None, OUTPUT_OBJECTS_NAME)
          assert len(categories) == 3
          assert all(
              [
                  any([x == y for x in categories])
                  for y in ("Location", "Parent", "Number")
              ]
          )
          categories = module.get_categories(None, INPUT_OBJECTS_NAME)
          assert len(categories) == 1
          assert categories[0] == "Children"
  
          categories = module.get_categories(None, NEW_OBJECTS_NAME)
          assert len(categories) == 0
  
          features = module.get_measurements(None, "Image", "Count")
          assert len(features) == 1
          assert features[0] == OUTPUT_OBJECTS_NAME
  
          features = module.get_measurements(None, "Image", "Threshold")
          threshold_features = (
              "OrigThreshold",
              "FinalThreshold",
              "WeightedVariance",
              "SumOfEntropies",
          )
          assert len(features) == 4
          assert all(
              [
                  any([x == y for x in features])
                  for y in threshold_features
              ]
          )
          for threshold_feature in threshold_features:
              objects = module.get_measurement_objects(
                  None,
                  "Image",
                  "Threshold",
                  threshold_feature,
              )
              assert len(objects) == 1
              assert objects[0] == OUTPUT_OBJECTS_NAME
  
          features = module.get_measurements(
              None, INPUT_OBJECTS_NAME, "Children"
          )
          assert len(features) == 1
          assert features[0] == "%s_Count" % OUTPUT_OBJECTS_NAME
  
          features = module.get_measurements(
              None, OUTPUT_OBJECTS_NAME, "Parent"
          )
          assert len(features) == 1
          assert features[0] == INPUT_OBJECTS_NAME
  
          features = module.get_measurements(
              None, OUTPUT_OBJECTS_NAME, "Location"
          )
          assert len(features) == 3
          assert all(
              [
                  any([x == y for x in features])
                  for y in ("Center_X", "Center_Y", "Center_Z")
              ]
          )
          features = module.get_measurements(
              None, OUTPUT_OBJECTS_NAME, "Number"
          )
          assert len(features) == 1
          assert features[0] == "Object_Number"
  
          columns = module.get_measurement_columns(None)
          expected_columns = [
              (
                  "Image",
                  "Threshold_%s_%s" % (f, OUTPUT_OBJECTS_NAME),
                  COLTYPE_FLOAT,
              )
              for f in threshold_features
          ]
          expected_columns += [
              (
                  "Image",
                  "Count_%s" % OUTPUT_OBJECTS_NAME,
                  COLTYPE_INTEGER,
              ),
              (
                  INPUT_OBJECTS_NAME,
                  "Children_%s_Count" % OUTPUT_OBJECTS_NAME,
                  COLTYPE_INTEGER,
              ),
              (
                  OUTPUT_OBJECTS_NAME,
                  "Location_Center_X",
                  COLTYPE_FLOAT,
              ),
              (
                  OUTPUT_OBJECTS_NAME,
                  "Location_Center_Y",
                  COLTYPE_FLOAT,
              ),
              (
                  OUTPUT_OBJECTS_NAME,
                  "Location_Center_Z",
                  COLTYPE_FLOAT,
              ),
              (
                  OUTPUT_OBJECTS_NAME,
                  "Number_Object_Number",
                  COLTYPE_INTEGER,
              ),
              (
                  OUTPUT_OBJECTS_NAME,
                  "Parent_%s" % INPUT_OBJECTS_NAME,
                  COLTYPE_INTEGER,
              ),
          ]
          assert len(columns) == len(expected_columns)
          for column in expected_columns:
              assert any(
                  [
                      all(
                          [
                              fa == fb
                              for fa, fb in zip(column, expected_column)
                          ]
                      )
                      for expected_column in expected_columns
                  ]
              )
  
imports: import io
  import centrosome.threshold
  import numpy
  from cellprofiler_core.constants.measurement import FF_COUNT, COLTYPE_FLOAT, COLTYPE_INTEGER, R_FIRST_IMAGE_NUMBER, R_SECOND_IMAGE_NUMBER, R_FIRST_OBJECT_NUMBER, R_SECOND_OBJECT_NUMBER
  from cellprofiler_core.constants.module._identify import TS_GLOBAL, O_TWO_CLASS, O_FOREGROUND
  import tests.frontend.modules
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler.modules.identifysecondaryobjects
  import cellprofiler.modules.threshold
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.workspace
label_desc: Use image node_id 17 for calling a global function with example usage: test_measurements_no_new_primary() without return types