code: def test_load_v11():
      file = tests.frontend.modules.get_test_resources_directory(
          "threshold/v11.pipeline"
      )
      with open(file, "r") as fd:
          data = fd.read()
  
      fd = io.StringIO(data)
      pipeline = cellprofiler_core.pipeline.Pipeline()
      pipeline.loadtxt(fd)
      module = pipeline.modules()[-1]
      assert isinstance(
          module, cellprofiler.modules.threshold.Threshold
      )
      assert module.x_name == "DNA"
      assert module.y_name == "Threshold"
      assert (
          module.threshold_scope
          == cellprofiler.modules.threshold.TS_ADAPTIVE
      )
      assert (
          module.global_operation.value
          == cellprofiler.modules.threshold.TM_LI
      )
      assert module.threshold_smoothing_scale == 0.01
      assert module.threshold_correction_factor == 2
      assert module.threshold_range.min == 0.01
      assert module.threshold_range.max == 0.9
      assert module.manual_threshold == 0.0
      assert module.thresholding_measurement == "None"
      assert (
          module.two_class_otsu
          == cellprofiler.modules.threshold.O_TWO_CLASS
      )
      assert (
          module.assign_middle_to_foreground
          == cellprofiler.modules.threshold.O_FOREGROUND
      )
      assert module.adaptive_window_size == 51
      assert (
          module.local_operation.value
          == cellprofiler.modules.threshold.TM_SAUVOLA
      )
  
imports: import io
  import centrosome.filter
  import centrosome.otsu
  import centrosome.threshold
  import numpy
  import numpy.testing
  import skimage.filters
  import skimage.filters.rank
  import skimage.morphology
  import cellprofiler.modules.threshold
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.module
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.workspace
  from cellprofiler_core.constants.measurement import FF_ORIG_THRESHOLD
  from cellprofiler_core.constants.module._identify import TS_GLOBAL
  import cellprofiler_library.modules
  import cellprofiler_library.functions
  import tests.frontend.modules
label_desc: Use image node_id 7 for calling a global function with example usage: test_load_v11() without return types