class_docstr: Categorical Sampler for discrete integer and categorical choices
  
  Parameters
  ----------
  tpe: `TPE` algorithm
      The tpe algorithm object which this sampler will be part of.
  observations: list
      Observed values in the dimension
  choices: list
      Candidate values for the dimension
class_docstr_tok: ["Categorical","Sampler","for","discrete","integer","and","categorical","choices","Parameters","--","--","--","--","--","tpe",":","`","TPE","`","algorithm","The","tpe","algorithm","object","which","this","sampler","will","be","part","of",".","observations",":","list","Observed","values","in","the","dimension","choices",":","list","Candidate","values","for","the","dimension"]
docstr: Build weights for categorical distribution based on observations
code: def _build_multinomial_weights(self) -> None:
      """Build weights for categorical distribution based on observations"""
      weights_obs = ramp_up_weights(
          len(self.obs), self.tpe.full_weight_num, self.tpe.equal_weight
      )
      counts_obs = numpy.bincount(
          self.obs, minlength=len(self.choices), weights=weights_obs
      )
      counts_obs = counts_obs + self.tpe.prior_weight
      self.weights = counts_obs / counts_obs.sum()
  
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 2 for calling the CategoricalSampler obj's underlying member method code with example usage: obj._build_multinomial_weights() without return types