code: def test_maximal_mask():
      """Test percent maximal with mask"""
      image = numpy.zeros((10, 10))
      image[:5, :5] = 0.5
      mask = numpy.ones((10, 10), bool)
      mask[:5, 5:] = False
      expected_value = 100.0 / 3.0
      workspace = make_workspace(image, mask)
      q = workspace.module
      q.image_groups[0].check_blur.value = False
      q.image_groups[0].check_saturation.value = True
      q.image_groups[0].check_intensity.value = False
      q.image_groups[0].calculate_threshold.value = False
      q.run(workspace)
      m = workspace.measurements
      assert (
          round(
              abs(
                  expected_value
                  - m.get_current_measurement(
                      "Image",
                      "ImageQuality_PercentMaximal_my_image",
                  )
              ),
              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 12 for calling a global function with example usage: test_maximal_mask() without return types