code: def suggest_categorical(args, rng, param_history, size):
      """
      Suggest a categorical ("choice" or "randint") parameter.
      """
      below, above = split_history(
          args, param_history
      )  # split history into good ones and bad ones
  
      weights = linear_forgetting_weights(args, len(below))
      counts = np.bincount(below, weights, size)
      p = (counts + args.prior_weight) / sum(
          counts + args.prior_weight
      )  # calculate weight of good choices
      samples = rng.choice(
          size, args.n_ei_candidates, p=p
      )  # sample N EIs using the weights
      below_llik = np.log(
          p[samples]
      )  # the probablity of these samples to be good (llik means log-likelyhood)
  
      weights = linear_forgetting_weights(args, len(above))
      counts = np.bincount(above, weights, size)
      p = (counts + args.prior_weight) / sum(
          counts + args.prior_weight
      )  # calculate weight of bad choices
      above_llik = np.log(
          p[samples]
      )  # the probablity of above samples to be bad
  
      return samples[np.argmax(below_llik - above_llik)]
  
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 4 for calling a global function with example usage: suggest_categorical(args, rng, param_history, size) and returns: samples