code: def test_image(image, measurements, module, workspace):
      """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
  
      image.pixel_data = pixels
  
      module.run(workspace)
  
      assert (
          measurements.get_current_measurement(
              "Image", "Intensity_TotalArea_image"
          )
          == 100
      )
  
      assert measurements.get_current_measurement(
          "Image", "Intensity_TotalIntensity_image"
      ) == numpy.sum(pixels)
  
      assert (
          measurements.get_current_measurement(
              "Image", "Intensity_MeanIntensity_image"
          )
          == numpy.sum(pixels) / 100.0
      )
  
      assert measurements.get_current_image_measurement(
          "Intensity_MinIntensity_image"
      ) == numpy.min(pixels)
  
      assert measurements.get_current_image_measurement(
          "Intensity_MaxIntensity_image"
      ) == numpy.max(pixels)
  
      assert (
          measurements.get_current_image_measurement(
              "Intensity_PercentMaximal_image"
          )
          == 4.0
      )
  
imports: import numpy
  import numpy.testing
  import pytest
  import skimage.morphology
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.module
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT, COLTYPE_INTEGER
  import cellprofiler.modules.measureimageintensity
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.workspace
label_desc: Use image node_id 12 for calling a global function with example usage: test_image(image, measurements, module, workspace) without return types