class_docstr: Base class for samplers.
  
  Optuna combines two types of sampling strategies, which are called *relative sampling* and
  *independent sampling*.
  
  *The relative sampling* determines values of multiple parameters simultaneously so that
  sampling algorithms can use relationship between parameters (e.g., correlation).
  Target parameters of the relative sampling are described in a relative search space, which
  is determined by :func:`~optuna.samplers.BaseSampler.infer_relative_search_space`.
  
  *The independent sampling* determines a value of a single parameter without considering any
  relationship between parameters. Target parameters of the independent sampling are the
  parameters not described in the relative search space.
  
  More specifically, parameters are sampled by the following procedure.
  At the beginning of a trial, :meth:`~optuna.samplers.BaseSampler.infer_relative_search_space`
  is called to determine the relative search space for the trial.
  During the execution of the objective function,
  :meth:`~optuna.samplers.BaseSampler.sample_relative` is called only once
  when sampling the parameters belonging to the relative search space for the first time.
  :meth:`~optuna.samplers.BaseSampler.sample_independent` is used to sample
  parameters that don't belong to the relative search space.
  
  The following figure depicts the lifetime of a trial and how the above three methods are
  called in the trial.
  
  .. image:: ../../../../image/sampling-sequence.png
  
  |
docstr: Trial pre-processing.
  
  This method is called before the objective function is called and right after the trial is
  instantiated. More precisely, this method is called during trial initialization, just
  before the :func:`~optuna.samplers.BaseSampler.infer_relative_search_space` call. In other
  words, it is responsible for pre-processing that should be done before inferring the search
  space.
  
  .. note::
      Added in v3.3.0 as an experimental feature. The interface may change in newer versions
      without prior notice. See https://github.com/optuna/optuna/releases/tag/v3.3.0.
  
  Args:
      study:
          Target study object.
      trial:
          Target trial object.
docstr_tok: ["Trial","pre-processing",".","This","method","is","called","before","the","objective","function","is","called","and","right","after","the","trial","is","instantiated",".","More","precisely",",","this","method","is","called","during","trial","initialization",",","just","before","the",":","func",":","`","~optuna.samplers.BaseSampler.infer_relative_search_space","`","call",".","In","other","words",",","it","is","responsible","for","pre-processing","that","should","be","done","before","inferring","the","search","space",".","..","note",":",":","Added","in","v3.3.0","as","an","experimental","feature",".","The","interface","may","change","in","newer","versions","without","prior","notice",".","See","https",":","\/\/github.com\/optuna\/optuna\/releases\/tag\/v3.3.0",".","Args",":","study",":","Target","study","object",".","trial",":","Target","trial","object","."]
code: def before_trial(self, study: Study, trial: FrozenTrial) -> None:
      """Trial pre-processing.
  
      This method is called before the objective function is called and right after the trial is
      instantiated. More precisely, this method is called during trial initialization, just
      before the :func:`~optuna.samplers.BaseSampler.infer_relative_search_space` call. In other
      words, it is responsible for pre-processing that should be done before inferring the search
      space.
  
      .. note::
          Added in v3.3.0 as an experimental feature. The interface may change in newer versions
          without prior notice. See https://github.com/optuna/optuna/releases/tag/v3.3.0.
  
      Args:
          study:
              Target study object.
          trial:
              Target trial object.
      """
  
      pass
  
imports: import abc
  from typing import Any
  from typing import Callable
  from typing import Dict
  from typing import Optional
  from typing import Sequence
  import warnings
  import numpy
  from optuna.distributions import BaseDistribution
  from optuna.study import Study
  from optuna.trial import FrozenTrial
  from optuna.trial import TrialState
label_desc: Use image node_id 5 for calling the BaseSampler obj's underlying member method code with example usage: obj.before_trial(study, trial) without return types