code: def test_run_images(
      image, module, image_set, workspace, object_set, tmpdir
  ):
      directory = str(tmpdir.mkdir("example"))
  
      segmented = skimage.measure.label(image.pixel_data > 0.5)
  
      obj = cellprofiler_core.object.Objects()
  
      obj.segmented = segmented
  
      object_set.add_objects(obj, "example")
  
      module.image_name.value = "example"
  
      module.export_option.value = "Images"
  
      module.objects_name.value = "example"
  
      module.use_filename.value = False
  
      module.nested_save.value = False
  
      module.directory.value = "{}|{}".format(
          cellprofiler_core.preferences.ABSOLUTE_FOLDER_NAME, directory
      )
  
      module.run(workspace)
  
      unique_labels = numpy.unique(obj.segmented)
  
      if unique_labels[0] == 0:
          unique_labels = unique_labels[1:]
  
      filenames = glob.glob(os.path.join(directory, "example_*.tiff"))
  
      for label in unique_labels:
          mask_in = obj.segmented == label
  
          properties = skimage.measure.regionprops(
              mask_in.astype(int), intensity_image=image.pixel_data
          )
  
          mask = properties[0].intensity_image
  
          filename = glob.glob(
              os.path.join(directory, "example_{}.tiff".format(label))
          )[0]
  
          numpy.testing.assert_array_equal(
              skimage.io.imread(filename), skimage.img_as_ubyte(mask)
          )
  
file_path: CellProfiler/tests/frontend/modules/test_savecroppedobjects.py
imports: import glob
  import os.path
  import numpy.testing
  import pytest
  import skimage
  import skimage.measure
  import skimage.morphology
  import cellprofiler_core.image
  import cellprofiler.modules.savecroppedobjects
  import cellprofiler_core.object
  import cellprofiler_core.preferences
  import cellprofiler_core.setting
label_desc: Use image node_id 1 for calling a global function with example usage: test_run_images(image, module, image_set, workspace, object_set, tmpdir) without return types