code: def _calculate_lowest_mu_threaded(inputs):
      [
          candidate,
          samples_x,
          samples_y,
          x_bounds,
          x_types,
          minimize_constraints_fun,
          minimize_starting_points,
      ] = inputs
  
      outputs = {"candidate": candidate, "expected_lowest_mu": None}
  
      for expected_mu in [
          candidate["expected_mu"] + 1.96 * candidate["expected_sigma"],
          candidate["expected_mu"] - 1.96 * candidate["expected_sigma"],
      ]:
          temp_samples_x = copy.deepcopy(samples_x)
          temp_samples_y = copy.deepcopy(samples_y)
  
          try:
              idx = temp_samples_x.index(candidate["hyperparameter"])
              # This handles the case of re-sampling a potential outlier
              temp_samples_y[idx].append(expected_mu)
          except ValueError:
              temp_samples_x.append(candidate["hyperparameter"])
              temp_samples_y.append([expected_mu])
  
          # Aggregates multiple observation of the sample sampling points
          temp_y_aggregation = [
              statistics.median(temp_sample_y)
              for temp_sample_y in temp_samples_y
          ]
          temp_gp = gp_create_model.create_model(
              temp_samples_x, temp_y_aggregation
          )
          temp_results = gp_selection.selection(
              "lm",
              temp_y_aggregation,
              x_bounds,
              x_types,
              temp_gp["model"],
              minimize_starting_points,
              minimize_constraints_fun=minimize_constraints_fun,
          )
  
          if (
              outputs["expected_lowest_mu"] is None
              or outputs["expected_lowest_mu"]
              > temp_results["expected_mu"]
          ):
              outputs["expected_lowest_mu"] = temp_results[
                  "expected_mu"
              ]
  
      return outputs
  
imports: import copy
  import logging
  import random
  import statistics
  import warnings
  from multiprocessing.dummy import Pool
  import numpy
  from schema import Schema, Optional
  from nni import ClassArgsValidator
  from nni.tuner import Tuner
  from nni.common.hpo_utils import validate_search_space
  from nni.utils import OptimizeMode, extract_scalar_reward
  from .None import lib_constraint_summation
  from .None import lib_data
  from .Regression_GMM import CreateModel
  from .Regression_GMM import Selection
  from .Regression_GP import CreateModel
  from .Regression_GP import OutlierDetection
  from .Regression_GP import Prediction
  from .Regression_GP import Selection
label_desc: Use image node_id 2 for calling a global function with example usage: _calculate_lowest_mu_threaded(inputs) and returns: outputs