code: def test_split_all():
      img = get_my_image()
      inj = cellprofiler_core.modules.injectimage.InjectImage(
          "my_image", img
      )
      inj.set_module_num(1)
      ctg = cellprofiler.modules.colortogray.ColorToGray()
      ctg.set_module_num(2)
      ctg.image_name.value = "my_image"
      ctg.combine_or_split.value = (
          cellprofiler.modules.colortogray.SPLIT
      )
      ctg.use_red.value = True
      ctg.use_blue.value = True
      ctg.use_green.value = True
      ctg.red_name.value = "my_red"
      ctg.green_name.value = "my_green"
      ctg.blue_name.value = "my_blue"
      pipeline = cellprofiler_core.pipeline.Pipeline()
      pipeline.add_module(inj)
      pipeline.add_module(ctg)
      pipeline.test_valid()
  
      measurements = cellprofiler_core.measurement.Measurements()
      object_set = cellprofiler_core.object.ObjectSet()
      image_set_list = cellprofiler_core.image.ImageSetList()
      workspace = cellprofiler_core.workspace.Workspace(
          pipeline, inj, None, None, measurements, image_set_list, None
      )
      inj.prepare_run(workspace)
      inj.prepare_group(workspace, {}, [1])
      image_set = image_set_list.get_image_set(0)
      inj.run(
          cellprofiler_core.workspace.Workspace(
              pipeline, inj, image_set, object_set, measurements, None
          )
      )
      ctg.run(
          cellprofiler_core.workspace.Workspace(
              pipeline, ctg, image_set, object_set, measurements, None
          )
      )
      red = image_set.get_image("my_red")
      assert red
      img = red.image
      numpy.testing.assert_almost_equal(img[0, 0], 1)
      numpy.testing.assert_almost_equal(img[0, 25], 0)
      numpy.testing.assert_almost_equal(img[25, 0], 0)
      numpy.testing.assert_almost_equal(img[25, 25], 0)
      green = image_set.get_image("my_green")
      assert green
      img = green.image
      numpy.testing.assert_almost_equal(img[0, 0], 0)
      numpy.testing.assert_almost_equal(img[0, 25], 1)
      numpy.testing.assert_almost_equal(img[25, 0], 0)
      numpy.testing.assert_almost_equal(img[25, 25], 0)
      blue = image_set.get_image("my_blue")
      assert blue
      img = blue.image
      numpy.testing.assert_almost_equal(img[0, 0], 0)
      numpy.testing.assert_almost_equal(img[0, 25], 0)
      numpy.testing.assert_almost_equal(img[25, 0], 1)
      numpy.testing.assert_almost_equal(img[25, 25], 0)
  
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 4 for calling a global function with example usage: test_split_all() without return types