code: def test_average_masked_color():
      numpy.random.seed(0)
      images_and_masks = [
          (
              numpy.random.uniform(size=(10, 10, 3)).astype(
                  numpy.float32
              ),
              numpy.random.uniform(size=(10, 10)) > 0.3,
          )
          for i in range(3)
      ]
      expected = numpy.zeros((10, 10, 3))
      expected_count = numpy.zeros((10, 10), numpy.float32)
      expected_mask = numpy.zeros((10, 10), bool)
      for image, mask in images_and_masks:
          expected[mask, :] += image[mask, :]
          expected_count[mask] += 1
          expected_mask = mask | expected_mask
      expected = expected / expected_count[:, :, numpy.newaxis]
      image = run_image_set(
          cellprofiler.modules.makeprojection.P_AVERAGE,
          images_and_masks,
      )
      assert image.has_mask
      numpy.testing.assert_equal(image.mask, expected_mask)
      numpy.testing.assert_almost_equal(
          image.pixel_data[expected_mask], expected[expected_mask]
      )
  
imports: import numpy
  import six.moves
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler.modules.makeprojection
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 6 for calling a global function with example usage: test_average_masked_color() without return types