code: def test_load_v2():
      file = tests.frontend.modules.get_test_resources_directory(
          "morph/v2.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(io.StringIO(data))
      ops = [
          cellprofiler.modules.morph.F_BRANCHPOINTS,
          cellprofiler.modules.morph.F_BRIDGE,
          cellprofiler.modules.morph.F_CLEAN,
          cellprofiler.modules.morph.F_CONVEX_HULL,
          cellprofiler.modules.morph.F_DIAG,
          cellprofiler.modules.morph.F_DISTANCE,
          cellprofiler.modules.morph.F_ENDPOINTS,
          cellprofiler.modules.morph.F_FILL,
          cellprofiler.modules.morph.F_HBREAK,
          cellprofiler.modules.morph.F_MAJORITY,
          cellprofiler.modules.morph.F_REMOVE,
          cellprofiler.modules.morph.F_SHRINK,
          cellprofiler.modules.morph.F_SKELPE,
          cellprofiler.modules.morph.F_SPUR,
          cellprofiler.modules.morph.F_THICKEN,
          cellprofiler.modules.morph.F_THIN,
          cellprofiler.modules.morph.F_VBREAK,
      ]
      assert len(pipeline.modules()) == 1
      module = pipeline.modules()[0]
      assert isinstance(module, cellprofiler.modules.morph.Morph)
      assert module.image_name == "InputImage"
      assert module.output_image_name == "MorphImage"
      assert len(module.functions) == len(ops)
  
imports: import io
  import centrosome.cpmorphology
  import centrosome.filter
  import numpy
  import pytest
  import scipy.ndimage
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler.modules.morph
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.setting
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 1 for calling a global function with example usage: test_load_v2() without return types