code: def test_experiment_threshold_cycle_skipping():
      """Regression test of IMG-970: can you handle nulls in measurements?"""
  
      numpy.random.seed(33)
      workspace = make_workspace(numpy.zeros((10, 10)))
      assert isinstance(
          workspace, cellprofiler_core.workspace.Workspace
      )
      module = workspace.module
      assert isinstance(
          module,
          cellprofiler.modules.measureimagequality.MeasureImageQuality,
      )
      m = workspace.measurements
      assert isinstance(m, cellprofiler_core.measurement.Measurements)
      image_name = module.image_groups[0].image_names.value[0]
      feature = (
          module.image_groups[0]
          .threshold_groups[0]
          .threshold_feature_name(image_name)
      )
      data = numpy.random.uniform(size=100)
      dlist = data.tolist()
      #
      # Erase 10 randomly
      #
      eraser = numpy.lexsort([numpy.random.uniform(size=100)])[:10]
      mask = numpy.ones(data.shape, bool)
      mask[eraser] = False
      for e in eraser:
          dlist[e] = None
  
      m.add_all_measurements("Image", feature, dlist)
      module.post_run(workspace)
      features_and_columns_match(
          m, module, EXPERIMENT, pipeline=workspace.pipeline
      )
  
      # Check threshold algorithms
      threshold_group = module.image_groups[0].threshold_groups[0]
      threshold_algorithm = threshold_group.threshold_algorithm
      image_name = module.image_groups[0].image_names.value_text
      f_mean, f_median, f_std = [
          threshold_group.threshold_feature_name(image_name, agg)
          for agg in (
              cellprofiler.modules.measureimagequality.AGG_MEAN,
              cellprofiler.modules.measureimagequality.AGG_MEDIAN,
              cellprofiler.modules.measureimagequality.AGG_STD,
          )
      ]
  
      expected = (
          (f_mean, numpy.mean(data[mask])),
          (f_median, numpy.median(data[mask])),
          (f_std, numpy.std(data[mask])),
      )
      for feature, expected_value in expected:
          value = m.get_experiment_measurement(feature)
          assert round(abs(value - expected_value), 7) == 0
  
imports: import io
  import centrosome.threshold
  import numpy
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT, EXPERIMENT
  from cellprofiler_core.constants.module._identify import O_FOREGROUND, O_THREE_CLASS, O_WEIGHTED_VARIANCE, O_TWO_CLASS, O_ENTROPY, O_BACKGROUND
  import cellprofiler.modules.measureimagequality
  import cellprofiler_core.modules.namesandtypes
  import cellprofiler.modules.smooth
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 15 for calling a global function with example usage: test_experiment_threshold_cycle_skipping() without return types