code: def standardize_bounds(bounds, x0, meth):
      """Converts bounds to the form required by the solver."""
      if meth == "trust-constr":
          if not isinstance(bounds, Bounds):
              lb, ub = old_bound_to_new(bounds)
              bounds = Bounds(lb, ub)
      elif meth in ("l-bfgs-b", "tnc", "slsqp"):
          if isinstance(bounds, Bounds):
              bounds = new_bounds_to_old(
                  bounds.lb, bounds.ub, x0.shape[0]
              )
      return bounds
  
file_path: catboost/contrib/python/scipy/py2/scipy/optimize/_minimize.py
imports: from __future__ import division, print_function, absolute_import
  from warnings import warn
  import numpy
  from scipy._lib.six import callable
  from .optimize import _minimize_neldermead, _minimize_powell, _minimize_cg, _minimize_bfgs, _minimize_newtoncg, _minimize_scalar_brent, _minimize_scalar_bounded, _minimize_scalar_golden, MemoizeJac
  from ._trustregion_dogleg import _minimize_dogleg
  from ._trustregion_ncg import _minimize_trust_ncg
  from ._trustregion_krylov import _minimize_trust_krylov
  from ._trustregion_exact import _minimize_trustregion_exact
  from ._trustregion_constr import _minimize_trustregion_constr
  from .lbfgsb import _minimize_lbfgsb
  from .tnc import _minimize_tnc
  from .cobyla import _minimize_cobyla
  from .slsqp import _minimize_slsqp
  from ._constraints import old_bound_to_new, new_bounds_to_old, old_constraint_to_new, new_constraint_to_old, NonlinearConstraint, LinearConstraint, Bounds
label_desc: Use image node_id 3 for calling a global function with example usage: standardize_bounds(bounds, x0, meth) and returns: bounds