code: def outlierDetection_threaded(samples_x, samples_y_aggregation):
      """
      Use Multi-thread to detect the outlier
      """
      outliers = []
  
      threads_inputs = [
          [samples_idx, samples_x, samples_y_aggregation]
          for samples_idx in range(0, len(samples_x))
      ]
      threads_pool = ThreadPool(min(4, len(threads_inputs)))
      threads_results = threads_pool.map(
          _outlierDetection_threaded, threads_inputs
      )
      threads_pool.close()
      threads_pool.join()
  
      for threads_result in threads_results:
          if threads_result is not None:
              outliers.append(threads_result)
          else:
              print("Error: threads_result is None.")
  
      outliers = outliers if outliers else None
      return outliers
  
file_path: nni/nni/algorithms/hpo/metis_tuner/Regression_GP/OutlierDetection.py
imports: import os
  import sys
  from multiprocessing.dummy import Pool
  from .None import CreateModel
  from .None import Prediction
label_desc: Use image node_id 2 for calling a global function with example usage: outlierDetection_threaded(samples_x, samples_y_aggregation) and returns: outliers