code: def _enumerate_candidates(
      param_distribution: BaseDistribution,
  ) -> Sequence[float]:
      if isinstance(param_distribution, FloatDistribution):
          if param_distribution.step is None:
              raise ValueError(
                  "FloatDistribution.step must be given for BruteForceSampler"
                  " (otherwise, the search space will be infinite)."
              )
          low = decimal.Decimal(str(param_distribution.low))
          high = decimal.Decimal(str(param_distribution.high))
          step = decimal.Decimal(str(param_distribution.step))
  
          ret = []
          value = low
          while value <= high:
              ret.append(float(value))
              value += step
  
          return ret
      elif isinstance(param_distribution, IntDistribution):
          return list(
              range(
                  param_distribution.low,
                  param_distribution.high + 1,
                  param_distribution.step,
              )
          )
      elif isinstance(param_distribution, CategoricalDistribution):
          return list(
              range(len(param_distribution.choices))
          )  # Internal representations.
      else:
          raise ValueError(
              f"Unknown distribution {param_distribution}."
          )
  
imports: from dataclasses import dataclass
  import decimal
  from typing import Any
  from typing import Dict
  from typing import Iterable
  from typing import List
  from typing import Optional
  from typing import Sequence
  from typing import Tuple
  import numpy
  from optuna._experimental import experimental_class
  from optuna.distributions import BaseDistribution
  from optuna.distributions import CategoricalDistribution
  from optuna.distributions import FloatDistribution
  from optuna.distributions import IntDistribution
  from optuna.samplers import BaseSampler
  from optuna.samplers._lazy_random_state import LazyRandomState
  from optuna.study import Study
  from optuna.trial import create_trial
  from optuna.trial import FrozenTrial
  from optuna.trial import TrialState
label_desc: Use image node_id 1 for calling a global function with example usage: _enumerate_candidates(param_distribution) and returns: ret, list, list