class_docstr: Gaussian Mixture Model Sampler for TPE algorithm
  
  Parameters
  ----------
  tpe: `TPE` algorithm
      The tpe algorithm object which this sampler will be part of.
  mus: list
      mus for each Gaussian components in the GMM.
      Default: ``None``
  sigmas: list
      sigmas for each Gaussian components in the GMM.
  low: real
      Lower bound of the sampled points.
  high: real
      Upper bound of the sampled points.
  weights: list
      Weights for each Gaussian components in the GMM
      Default: ``None``
  base_attempts: int, optional
      Base number of attempts to sample points within `low` and `high` bounds.
      Defaults to 10.
  attempts_factor: int, optional
      If sampling always falls out of bound try again with `attempts` * `attempts_factor`.
      Defaults to 10.
  max_attempts: int, optional
      If sampling always falls out of bound try again with `attempts` * `attempts_factor`
      up to `max_attempts` (inclusive).
      Defaults to 10000.
class_docstr_tok: ["Gaussian","Mixture","Model","Sampler","for","TPE","algorithm","Parameters","--","--","--","--","--","tpe",":","`","TPE","`","algorithm","The","tpe","algorithm","object","which","this","sampler","will","be","part","of",".","mus",":","list","mus","for","each","Gaussian","components","in","the","GMM",".","Default",":","``","None","``","sigmas",":","list","sigmas","for","each","Gaussian","components","in","the","GMM",".","low",":","real","Lower","bound","of","the","sampled","points",".","high",":","real","Upper","bound","of","the","sampled","points",".","weights",":","list","Weights","for","each","Gaussian","components","in","the","GMM","Default",":","``","None","``","base_attempts",":","int",",","optional","Base","number","of","attempts","to","sample","points","within","`","low","`","and","`","high","`","bounds",".","Defaults","to","10.","attempts_factor",":","int",",","optional","If","sampling","always","falls","out","of","bound","try","again","with","`","attempts","`","*","`","attempts_factor","`",".","Defaults","to","10.","max_attempts",":","int",",","optional","If","sampling","always","falls","out","of","bound","try","again","with","`","attempts","`","*","`","attempts_factor","`","up","to","`","max_attempts","`","(","inclusive",")",".","Defaults","to","10000","."]
code: def __init__(
      self,
      tpe: TPE,
      mus: Sequence[float] | numpy.ndarray,
      sigmas: Sequence[float] | numpy.ndarray,
      low: float,
      high: float,
      weights: Sequence[float] | numpy.ndarray | None = None,
      base_attempts: int = 10,
      attempts_factor: int = 10,
      max_attempts: int = 10000,
  ):
      self.tpe = tpe
  
      self.mus = mus
      self.sigmas = sigmas
      self.low = low
      self.high = high
      self.weights = (
          weights
          if weights is not None
          else len(mus) * [1.0 / len(mus)]
      )
  
      self.base_attempts = base_attempts
      self.attempts_factor = attempts_factor
      self.max_attempts = max_attempts
  
      self.pdfs: list[rv_frozen] = []
      self._build_mixture()
  
imports: from __future__ import annotations
  import logging
  from typing import Any, Callable, ClassVar, Iterable, Sequence, TypeVar
  import numpy
  from scipy.stats import norm
  from scipy.stats.distributions import rv_frozen
  from orion.algo.base import BaseAlgorithm
  from orion.algo.base.parallel_strategy import ParallelStrategy, strategy_factory
  from orion.algo.space import Integer, Real, Space
  from orion.core.utils import format_trials
  from orion.core.utils.flatten import flatten
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 1 to create a new GMMSampler object  with example: obj = GMMSampler(tpe, mus, sigmas, low, high, weights, base_attempts, attempts_factor, max_attempts)