code: def adaptive_parzen_normal(args, history_mus, prior_mu, prior_sigma):
      """
      The "Adaptive Parzen Estimator" described in paper section 4.2, for normal distribution.
  
      Because TPE internally only supports categorical and normal distributed space (domain),
      this function is used for everything other than "choice" and "randint".
  
      Parameters
      ----------
      args: TpeArguments
          Algorithm arguments.
      history_mus: 1-d array of float
          Parameter values evaluated in history.
          These are the "observations" in paper section 4.2. ("placing density in the vicinity of K observations")
      prior_mu: float
          µ value of normal search space.
      piror_sigma: float
          σ value of normal search space.
  
      Returns
      -------
      Tuple of three 1-d float arrays: (weight, µ, σ).
  
      The tuple represents N+1 "vicinity of observations" and each one's weight,
      calculated from "N" history and "1" user provided prior.
  
      The result is sorted by µ.
      """
      mus = np.append(history_mus, prior_mu)
      order = np.argsort(mus)
      mus = mus[order]
      prior_index = np.searchsorted(mus, prior_mu)
  
      if len(mus) == 1:
          sigmas = np.asarray([prior_sigma])
      elif len(mus) == 2:
          sigmas = np.asarray([prior_sigma * 0.5, prior_sigma * 0.5])
          sigmas[prior_index] = prior_sigma
      else:
          l_delta = mus[1:-1] - mus[:-2]
          r_delta = mus[2:] - mus[1:-1]
          sigmas_mid = np.maximum(l_delta, r_delta)
          sigmas = np.concatenate(
              [[mus[1] - mus[0]], sigmas_mid, [mus[-1] - mus[-2]]]
          )
          sigmas[prior_index] = prior_sigma
      # "magic formula" in official implementation
      n = min(100, len(mus) + 1)
      sigmas = np.clip(sigmas, prior_sigma / n, prior_sigma)
  
      weights = np.append(
          linear_forgetting_weights(args, len(mus) - 1),
          args.prior_weight,
      )
      weights = weights[order]
  
      return weights / np.sum(weights), mus, sigmas
  
imports: from __future__ import annotations
  from collections import defaultdict
  import logging
  import math
  from typing import Any, NamedTuple
  import numpy
  from scipy.special import erf
  from typing_extensions import Literal
  import nni
  from nni.common.hpo_utils import Deduplicator, OptimizeMode, format_search_space, deformat_parameters, format_parameters
  from nni.tuner import Tuner
  from nni.utils import extract_scalar_reward
  from .None import random_tuner
label_desc: Use image node_id 8 for calling a global function with example usage: adaptive_parzen_normal(args, history_mus, prior_mu, prior_sigma) and returns: unknown,  mus,  sigmas