code: def process_worker(threads, data, endpoint, samples, time_based):
      results = []
      with concurrent.futures.ThreadPoolExecutor(
          max_workers=threads
      ) as executor:
          results = executor_submitter(
              executor,
              threads,
              task,
              data,
              endpoint,
              samples,
              time_based,
          )
  
      return results
  
file_path: cortex/test/utils/throughput_test.py
imports: import os
  import sys
  import click
  import concurrent.futures
  import requests
  import imageio
  import json
  import time
  import itertools
  import cv2
  import numpy
  from validator_collection import checkers
label_desc: Use image node_id 2 for calling a global function with example usage: process_worker(threads, data, endpoint, samples, time_based) and returns: results