code: def test_intensity_image():
      """Test operation on a single unmasked image"""
      numpy.random.seed(0)
      pixels = (
          numpy.random.uniform(size=(10, 10)).astype(numpy.float32)
          * 0.99
      )
      pixels[0:2, 0:2] = 1
      workspace = make_workspace(pixels, None)
      q = workspace.module
      q.image_groups[0].check_blur.value = False
      q.image_groups[0].check_saturation.value = False
      q.image_groups[0].check_intensity.value = True
      q.image_groups[0].calculate_threshold.value = False
      q.run(workspace)
      m = workspace.measurements
      assert m.get_current_measurement(
          "Image", "ImageQuality_TotalIntensity_my_image"
      ) == numpy.sum(pixels)
      assert (
          m.get_current_measurement(
              "Image", "ImageQuality_MeanIntensity_my_image"
          )
          == numpy.sum(pixels) / 100.0
      )
      assert m.get_current_image_measurement(
          "ImageQuality_MinIntensity_my_image"
      ) == numpy.min(pixels)
      assert m.get_current_image_measurement(
          "ImageQuality_MaxIntensity_my_image"
      ) == numpy.max(pixels)
  
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 20 for calling a global function with example usage: test_intensity_image() without return types