code: def test_load_v3():
      """
      Tests a pipeline that was produced with module revision 3.
      The channel names are named according to the schema:
      Channel(#new_imagenumber)_(#channel_number),
      e.g. Channel3_2 would be the image number 3 that contains channel
      number 2.
      Thus it can be easily checked via the new image name, if the channel
      number is correctly parsed.
      """
      file = tests.frontend.modules.get_test_resources_directory(
          "colortogray/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.colortogray.ColorToGray
      )
      assert module.image_name == "DNA"
      assert module.channel_count.value == 8
      for i in range(module.channel_count.value):
          c = module.channels[i].image_name.value.split("_")[1]
          assert module.channels[i].channel_choice.value == int(c)
      assert module.channels[6].image_name.value == "Channel7_7"
  
imports: import numpy
  import pytest
  import six.moves
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler.modules.colortogray
  import cellprofiler_core.modules.injectimage
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 10 for calling a global function with example usage: test_load_v3() without return types