code: def _transform_images_multi(
      sample_collection,
      num_workers,
      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,
      skip_failures=False,
  ):
      if output_field is None:
          output_field = media_field
  
      diff_field = output_field != media_field
  
      sample_ids, inpaths = sample_collection.values(
          ["id", media_field]
      )
  
      inputs = []
      for sample_id, inpath in zip(sample_ids, inpaths):
          outpath = _get_outpath(
              inpath, output_dir=output_dir, rel_dir=rel_dir
          )
  
          if ext is not None:
              outpath = os.path.splitext(outpath)[0] + ext
  
          inputs.append(
              (
                  sample_id,
                  inpath,
                  outpath,
                  size,
                  min_size,
                  max_size,
                  interpolation,
                  force_reencode,
                  delete_originals,
                  skip_failures,
              )
          )
  
      outpaths = {}
  
      try:
          with fou.ProgressBar(inputs) as pb:
              with fou.get_multiprocessing_context().Pool(
                  processes=num_workers
              ) as pool:
                  for sample_id, inpath, outpath, _ in pb(
                      pool.imap_unordered(_do_transform, inputs)
                  ):
                      if update_filepaths and (
                          diff_field or outpath != inpath
                      ):
                          outpaths[sample_id] = outpath
      finally:
          if outpaths:
              sample_collection.set_values(
                  output_field, outpaths, key_field="id"
              )
  
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 9 for calling a global function with example usage: _transform_images_multi(sample_collection, num_workers, size, min_size, max_size, interpolation, ext, force_reencode, media_field, output_field, output_dir, rel_dir, update_filepaths, delete_originals, skip_failures) without return types