code: def test_load_v3():
      file = tests.frontend.modules.get_test_resources_directory(
          "measuregranularity/v3.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()) == 1
      module = pipeline.modules()[0]
      assert isinstance(
          module,
          cellprofiler.modules.measuregranularity.MeasureGranularity,
      )
      assert len(module.images_list.value) == 2
      for image_name, subsample_size, bsize, elsize, glen, objs in (
          ("DNA", 0.25, 0.25, 10, 16, ("Nuclei", "Cells")),
          (
              "Actin",
              0.33,
              0.50,
              12,
              20,
              ("Nuclei", "Cells", "Cytoplasm"),
          ),
      ):
          assert image_name in module.images_list.value
          assert module.subsample_size.value == 0.25
          assert module.image_sample_size.value == 0.25
          assert module.element_size.value == 10
          assert module.granular_spectrum_length.value == 16
          assert len(module.objects_list.value) == 3
          assert all([obj in module.objects_list.value for obj in objs])
  
imports: import sys
  import numpy
  import six.moves
  import cellprofiler_core.image
  import cellprofiler.modules.measuregranularity
  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_v3() without return types