code: def _transform_images(
      sample_collection,
      size=None,
      min_size=None,
      max_size=None,
      interpolation=None,
      ext=None,
      force_reencode=False,
      media_field="filepath",
      output_field=None,
      output_dir=None,
      rel_dir=None,
      update_filepaths=True,
      delete_originals=False,
      num_workers=None,
      skip_failures=False,
  ):
      ext = _parse_ext(ext)
  
      num_workers = fou.recommend_process_pool_workers(num_workers)
  
      if num_workers <= 1:
          _transform_images_single(
              sample_collection,
              size=size,
              min_size=min_size,
              max_size=max_size,
              interpolation=interpolation,
              ext=ext,
              force_reencode=force_reencode,
              media_field=media_field,
              output_field=output_field,
              output_dir=output_dir,
              rel_dir=rel_dir,
              update_filepaths=update_filepaths,
              delete_originals=delete_originals,
              skip_failures=skip_failures,
          )
      else:
          _transform_images_multi(
              sample_collection,
              num_workers,
              size=size,
              min_size=min_size,
              max_size=max_size,
              interpolation=interpolation,
              ext=ext,
              force_reencode=force_reencode,
              media_field=media_field,
              output_field=output_field,
              output_dir=output_dir,
              rel_dir=rel_dir,
              update_filepaths=update_filepaths,
              delete_originals=delete_originals,
              skip_failures=skip_failures,
          )
  
imports: import logging
  import os
  import eta.core.image
  import eta.core.utils
  import fiftyone.core.storage
  import fiftyone.core.utils
  import fiftyone.core.validation
label_desc: Use image node_id 7 for calling a global function with example usage: _transform_images(sample_collection, size, min_size, max_size, interpolation, ext, force_reencode, media_field, output_field, output_dir, rel_dir, update_filepaths, delete_originals, num_workers, skip_failures) without return types