code: def test_load_v1():
      file = tests.frontend.modules.get_test_resources_directory(
          "unmixcolors/v1.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.unmixcolors.UnmixColors
      )
      assert module.input_image_name == "Color"
      assert module.stain_count.value == 13
      assert module.outputs[0].image_name == "Hematoxylin"
      assert module.outputs[-1].image_name == "RedWine"
      for i, stain in enumerate(
          (
              cellprofiler.modules.unmixcolors.CHOICE_HEMATOXYLIN,
              cellprofiler.modules.unmixcolors.CHOICE_EOSIN,
              cellprofiler.modules.unmixcolors.CHOICE_DAB,
              cellprofiler.modules.unmixcolors.CHOICE_FAST_RED,
              cellprofiler.modules.unmixcolors.CHOICE_FAST_BLUE,
              cellprofiler.modules.unmixcolors.CHOICE_METHYL_GREEN,
              cellprofiler.modules.unmixcolors.CHOICE_AEC,
              cellprofiler.modules.unmixcolors.CHOICE_ANILINE_BLUE,
              cellprofiler.modules.unmixcolors.CHOICE_AZOCARMINE,
              cellprofiler.modules.unmixcolors.CHOICE_ALCIAN_BLUE,
              cellprofiler.modules.unmixcolors.CHOICE_PAS,
          )
      ):
          assert module.outputs[i].stain_choice == stain
      assert (
          round(abs(module.outputs[-1].red_absorbance.value - 0.1), 7)
          == 0
      )
      assert (
          round(abs(module.outputs[-1].green_absorbance.value - 0.2), 7)
          == 0
      )
      assert (
          round(abs(module.outputs[-1].blue_absorbance.value - 0.3), 7)
          == 0
      )
  
file_path: CellProfiler/tests/frontend/modules/test_unmixcolors.py
imports: import numpy
  import six.moves
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler.modules.unmixcolors
  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_v1() without return types