code: def test_load_v2():
      file = tests.frontend.modules.get_test_resources_directory(
          "enhanceorsuppressfeatures/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
      for (
          module,
          (
              input_name,
              output_name,
              operation,
              feature_size,
              feature_type,
              min_range,
              max_range,
          ),
      ) in zip(
          pipeline.modules(),
          (
              (
                  "Initial",
                  "EnhancedSpeckles",
                  cellprofiler.modules.enhanceorsuppressfeatures.ENHANCE,
                  11,
                  cellprofiler.modules.enhanceorsuppressfeatures.E_SPECKLES,
                  1,
                  10,
              ),
              (
                  "EnhancedSpeckles",
                  "EnhancedNeurites",
                  cellprofiler.modules.enhanceorsuppressfeatures.ENHANCE,
                  9,
                  cellprofiler.modules.enhanceorsuppressfeatures.E_NEURITES,
                  1,
                  10,
              ),
              (
                  "EnhancedNeurites",
                  "EnhancedDarkHoles",
                  cellprofiler.modules.enhanceorsuppressfeatures.ENHANCE,
                  9,
                  cellprofiler.modules.enhanceorsuppressfeatures.E_DARK_HOLES,
                  4,
                  11,
              ),
              (
                  "EnhancedDarkHoles",
                  "EnhancedCircles",
                  cellprofiler.modules.enhanceorsuppressfeatures.ENHANCE,
                  9,
                  cellprofiler.modules.enhanceorsuppressfeatures.E_CIRCLES,
                  4,
                  11,
              ),
              (
                  "EnhancedCircles",
                  "Suppressed",
                  cellprofiler.modules.enhanceorsuppressfeatures.SUPPRESS,
                  13,
                  cellprofiler.modules.enhanceorsuppressfeatures.E_CIRCLES,
                  4,
                  11,
              ),
          ),
      ):
          assert module.module_name == "EnhanceOrSuppressFeatures"
          assert isinstance(
              module,
              cellprofiler.modules.enhanceorsuppressfeatures.EnhanceOrSuppressFeatures,
          )
          assert module.x_name == input_name
          assert module.y_name == output_name
          assert module.method == operation
          assert module.enhance_method == feature_type
          assert module.object_size == feature_size
          assert module.hole_size.min == min_range
          assert module.hole_size.max == max_range
  
imports: import io
  import os.path
  import centrosome.filter
  import numpy
  import pytest
  import scipy.ndimage
  import skimage.exposure
  import skimage.filters
  import skimage.transform
  import tests.frontend.modules
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.module
  import cellprofiler.modules.enhanceorsuppressfeatures
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.workspace
  import tests.frontend
label_desc: Use image node_id 30 for calling a global function with example usage: test_load_v2() without return types