code: def test_cmyk():
      numpy.random.seed(0)
      for combination in [
          [(i & 2 ^ j) != 0 for j in range(4)] for i in range(1, 16)
      ]:
          adjustments = numpy.random.uniform(size=7)
          images = [
              numpy.random.uniform(size=(10, 15))
              if combination[i]
              else None
              for i in range(4)
          ]
          images = [None] * 3 + images
          workspace, module = make_workspace(
              cellprofiler.modules.graytocolor.SCHEME_CMYK,
              images,
              adjustments,
          )
          module.run(workspace)
          image = workspace.image_set.get_image(OUTPUT_IMAGE_NAME)
          pixel_data = image.pixel_data
  
          expected = numpy.array(
              [
                  numpy.dstack(
                      [
                          image * adjustment
                          if image is not None
                          else numpy.zeros((10, 15))
                      ]
                      * 3
                  )
                  * numpy.array(multiplier)
                  / numpy.sum(multiplier)
                  for image, multiplier, adjustment in (
                      (images[3], (0, 1, 1), adjustments[3]),
                      (images[4], (1, 0, 1), adjustments[4]),
                      (images[5], (1, 1, 0), adjustments[5]),
                      (images[6], (1, 1, 1), adjustments[6]),
                  )
              ]
          )
          expected = numpy.sum(expected, 0)
          assert numpy.all(numpy.abs(expected - pixel_data) <= 0.00001)
  
file_path: CellProfiler/tests/frontend/modules/test_graytocolor.py
imports: import numpy
  import six.moves
  import os
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler.modules.graytocolor
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 4 for calling a global function with example usage: test_cmyk() without return types