code: def test_one_masked(image, measurements, module, objects, workspace):
      """Check measurements on a 3x3 square of 1's"""
      img = numpy.array(
          [
              [0, 0, 0, 0, 0, 0, 0],
              [0, 0, 1, 1, 1, 0, 0],
              [0, 0, 1, 1, 1, 0, 0],
              [0, 0, 1, 1, 1, 0, 0],
              [0, 0, 0, 0, 0, 0, 0],
          ]
      )
  
      mask = img > 0
  
      image.pixel_data = img.astype(float)
  
      image.mask = mask
  
      objects.segmented = img.astype(int)
  
      module.run(workspace)
  
      for meas_name, value in (
          (
              cellprofiler.modules.measureobjectintensity.INTEGRATED_INTENSITY,
              9,
          ),
          (
              cellprofiler.modules.measureobjectintensity.MEAN_INTENSITY,
              1,
          ),
          (
              cellprofiler.modules.measureobjectintensity.STD_INTENSITY,
              0,
          ),
          (
              cellprofiler.modules.measureobjectintensity.MIN_INTENSITY,
              1,
          ),
          (
              cellprofiler.modules.measureobjectintensity.MAX_INTENSITY,
              1,
          ),
          (
              cellprofiler.modules.measureobjectintensity.INTEGRATED_INTENSITY_EDGE,
              8,
          ),
          (
              cellprofiler.modules.measureobjectintensity.MEAN_INTENSITY_EDGE,
              1,
          ),
          (
              cellprofiler.modules.measureobjectintensity.STD_INTENSITY_EDGE,
              0,
          ),
          (
              cellprofiler.modules.measureobjectintensity.MIN_INTENSITY_EDGE,
              1,
          ),
          (
              cellprofiler.modules.measureobjectintensity.MAX_INTENSITY_EDGE,
              1,
          ),
          (
              cellprofiler.modules.measureobjectintensity.MASS_DISPLACEMENT,
              0,
          ),
          (
              cellprofiler.modules.measureobjectintensity.LOWER_QUARTILE_INTENSITY,
              1,
          ),
          (
              cellprofiler.modules.measureobjectintensity.MEDIAN_INTENSITY,
              1,
          ),
          (
              cellprofiler.modules.measureobjectintensity.MAD_INTENSITY,
              0,
          ),
          (
              cellprofiler.modules.measureobjectintensity.UPPER_QUARTILE_INTENSITY,
              1,
          ),
      ):
          feature_name = "%s_%s_%s" % (
              cellprofiler.modules.measureobjectintensity.INTENSITY,
              meas_name,
              "MyImage",
          )
  
          data = measurements.get_current_measurement(
              "MyObjects", feature_name
          )
  
          assert numpy.product(data.shape) == 1
  
          assert data[0] == value, "%s expected %f != actual %f" % (
              meas_name,
              value,
              data[0],
          )
  
imports: import math
  import centrosome.outline
  import numpy
  import numpy.testing
  import pytest
  import skimage.measure
  import skimage.segmentation
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  from cellprofiler_core.constants.measurement import EXPERIMENT, COLTYPE_FLOAT, C_LOCATION
  import cellprofiler.modules.measureobjectintensity
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.workspace
label_desc: Use image node_id 13 for calling a global function with example usage: test_one_masked(image, measurements, module, objects, workspace) without return types