code: def test_load_v3():
      file = tests.frontend.modules.get_test_resources_directory(
          "graytocolor/v3.pipeline"
      )
      with open(file, "r") as fd:
          data = fd.read()
  
      pipeline = cellprofiler_core.pipeline.Pipeline()
  
      def callback(caller, event):
          assert not isinstance(
              event, cellprofiler_core.pipeline.event.LoadException
          )
  
      pipeline.add_listener(callback)
      pipeline.load(six.moves.StringIO(data))
      assert len(pipeline.modules()) == 1
      module = pipeline.modules()[0]
      assert isinstance(
          module, cellprofiler.modules.graytocolor.GrayToColor
      )
      assert (
          module.scheme_choice
          == cellprofiler.modules.graytocolor.SCHEME_COMPOSITE
      )
      assert module.rgb_image_name == "myimage"
      assert module.red_image_name == "1"
      assert module.green_image_name == "2"
      assert module.blue_image_name == "3"
      assert module.cyan_image_name == "4"
      assert module.magenta_image_name == "5"
      assert module.yellow_image_name == "6"
      assert module.gray_image_name == "7"
      assert (
          numpy.round(
              numpy.abs(module.red_adjustment_factor.value - 2.1), 7
          )
          == 0
      )
      assert (
          numpy.round(
              numpy.abs(module.green_adjustment_factor.value - 2.2), 7
          )
          == 0
      )
      assert (
          numpy.round(
              numpy.abs(module.blue_adjustment_factor.value - 2.3), 7
          )
          == 0
      )
      assert (
          numpy.round(
              numpy.abs(module.cyan_adjustment_factor.value - 1.1), 7
          )
          == 0
      )
      assert (
          numpy.round(
              numpy.abs(module.magenta_adjustment_factor.value - 1.2), 7
          )
          == 0
      )
      assert (
          numpy.round(
              numpy.abs(module.yellow_adjustment_factor.value - 1.3), 7
          )
          == 0
      )
      assert (
          numpy.round(
              numpy.abs(module.gray_adjustment_factor.value - 1.4), 7
          )
          == 0
      )
      assert len(module.stack_channels) == 2
      assert module.stack_channels[0].image_name == "DNA"
      assert module.stack_channels[1].image_name == "GFP"
      assert module.stack_channels[0].color.to_rgb() == (127, 0, 255)
      assert module.stack_channels[1].color.to_rgb() == (127, 255, 0)
  
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 2 for calling a global function with example usage: test_load_v3() without return types