code: def test_load_v1():
      file = tests.frontend.modules.get_test_resources_directory(
          "maskobjects/v1.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(six.moves.StringIO(data))
      assert len(pipeline.modules()) == 4
  
      module = pipeline.modules()[0]
      assert isinstance(
          module, cellprofiler.modules.maskobjects.MaskObjects
      )
      assert module.object_name.value == "Nuclei"
      assert (
          module.mask_choice.value
          == cellprofiler.modules.maskobjects.MC_OBJECTS
      )
      assert module.masking_objects.value == "Wells"
      assert module.remaining_objects.value == "MaskedNuclei"
      assert (
          module.retain_or_renumber.value
          == cellprofiler.modules.maskobjects.R_RENUMBER
      )
      assert (
          module.overlap_choice.value
          == cellprofiler.modules.maskobjects.P_MASK
      )
      assert not module.wants_inverted_mask
  
      module = pipeline.modules()[1]
      assert isinstance(
          module, cellprofiler.modules.maskobjects.MaskObjects
      )
      assert module.object_name.value == "Cells"
      assert (
          module.mask_choice.value
          == cellprofiler.modules.maskobjects.MC_IMAGE
      )
      assert module.masking_image.value == "WellBoundary"
      assert module.remaining_objects.value == "MaskedCells"
      assert (
          module.retain_or_renumber.value
          == cellprofiler.modules.maskobjects.R_RETAIN
      )
      assert (
          module.overlap_choice.value
          == cellprofiler.modules.maskobjects.P_KEEP
      )
      assert not module.wants_inverted_mask
  
      module = pipeline.modules()[2]
      assert isinstance(
          module, cellprofiler.modules.maskobjects.MaskObjects
      )
      assert module.object_name.value == "Cytoplasm"
      assert (
          module.mask_choice.value
          == cellprofiler.modules.maskobjects.MC_OBJECTS
      )
      assert module.masking_objects.value == "Cells"
      assert module.remaining_objects.value == "MaskedCytoplasm"
      assert (
          module.retain_or_renumber.value
          == cellprofiler.modules.maskobjects.R_RENUMBER
      )
      assert (
          module.overlap_choice.value
          == cellprofiler.modules.maskobjects.P_REMOVE
      )
      assert not module.wants_inverted_mask
  
      module = pipeline.modules()[3]
      assert isinstance(
          module, cellprofiler.modules.maskobjects.MaskObjects
      )
      assert module.object_name.value == "Speckles"
      assert (
          module.mask_choice.value
          == cellprofiler.modules.maskobjects.MC_OBJECTS
      )
      assert module.masking_objects.value == "Cells"
      assert module.remaining_objects.value == "MaskedSpeckles"
      assert (
          module.retain_or_renumber.value
          == cellprofiler.modules.maskobjects.R_RENUMBER
      )
      assert (
          module.overlap_choice.value
          == cellprofiler.modules.maskobjects.P_REMOVE_PERCENTAGE
      )
      assert round(abs(module.overlap_fraction.value - 0.3), 7) == 0
      assert not module.wants_inverted_mask
  
imports: import numpy
  import six.moves
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.measurement
  import cellprofiler_core.modules
  from cellprofiler_core.constants.measurement import FF_COUNT, COLTYPE_INTEGER, M_LOCATION_CENTER_X, COLTYPE_FLOAT, M_LOCATION_CENTER_Y, FF_PARENT, M_NUMBER_OBJECT_NUMBER, FF_CHILDREN_COUNT, C_COUNT, C_LOCATION, C_NUMBER, C_PARENT, C_CHILDREN, FTR_CENTER_X, FTR_CENTER_Y, FTR_OBJECT_NUMBER
  import cellprofiler.modules.maskobjects
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  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_v1() without return types