code: def test_load_with_extracted_operations():
      file = tests.frontend.modules.get_test_resources_directory(
          "morph/extracted_operations.pipeline"
      )
      with open(file, "r") as fd:
          data = fd.read()
  
      def callback(caller, event):
          assert not isinstance(
              event, cellprofiler_core.pipeline.event.LoadException
          )
  
      pipeline = cellprofiler_core.pipeline.Pipeline()
      pipeline.add_listener(callback)
      pipeline.load(io.StringIO(data))
  
      module = pipeline.modules()[-1]
      with pytest.raises(cellprofiler_core.setting.ValidationError):
          module.test_valid(pipeline)
  
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 2 for calling a global function with example usage: test_load_with_extracted_operations() without return types