code: def process_images_in_process_pool(
      images_to_check,
      known_names,
      known_face_encodings,
      number_of_cpus,
      tolerance,
      show_distance,
  ):
      if number_of_cpus == -1:
          processes = None
      else:
          processes = number_of_cpus
  
      # macOS will crash due to a bug in libdispatch if you don't use 'forkserver'
      context = multiprocessing
      if "forkserver" in multiprocessing.get_all_start_methods():
          context = multiprocessing.get_context("forkserver")
  
      pool = context.Pool(processes=processes)
  
      function_parameters = zip(
          images_to_check,
          itertools.repeat(known_names),
          itertools.repeat(known_face_encodings),
          itertools.repeat(tolerance),
          itertools.repeat(show_distance),
      )
  
      pool.starmap(test_image, function_parameters)
  
file_path: face_recognition/face_recognition/face_recognition_cli.py
imports: from __future__ import print_function
  import click
  import os
  import re
  import face_recognition.api
  import multiprocessing
  import itertools
  import sys
  import PIL.Image
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: process_images_in_process_pool(images_to_check, known_names, known_face_encodings, number_of_cpus, tolerance, show_distance) without return types