code: def test_load_v2():
      file = tests.frontend.modules.get_test_resources_directory(
          "untangleworms/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))
      assert len(pipeline.modules()) == 5
      module = pipeline.modules()[0]
      assert isinstance(
          module, cellprofiler.modules.untangleworms.UntangleWorms
      )
      assert module.image_name == "BinaryWorms"
      assert (
          module.overlap == cellprofiler.modules.untangleworms.OO_BOTH
      )
      assert module.overlap_objects == "OverlappingWorms"
      assert module.nonoverlapping_objects == "NonOverlappingWorms"
      assert not module.wants_training_set_weights
      assert module.override_overlap_weight.value == 3
      assert module.override_leftover_weight.value == 5
      assert module.custom_complexity == 399
  
      for module, complexity in zip(
          pipeline.modules(),
          (
              cellprofiler.modules.untangleworms.C_ALL,
              cellprofiler.modules.untangleworms.C_MEDIUM,
              cellprofiler.modules.untangleworms.C_HIGH,
              cellprofiler.modules.untangleworms.C_VERY_HIGH,
              cellprofiler.modules.untangleworms.C_CUSTOM,
          ),
      ):
          assert module.complexity == complexity
  
imports: import base64
  import io
  import os
  import tempfile
  import zlib
  import imageio
  import centrosome.outline
  import numpy
  import scipy.ndimage
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.modules
  import cellprofiler.modules.untangleworms
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.setting
  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_v2() without return types