code: def _convert_to_highs_enum(option, option_str, choices):
      # If option is in the choices we can look it up, if not use
      # the default value taken from function signature and warn:
      try:
          return choices[option.lower()]
      except AttributeError:
          return choices[option]
      except KeyError:
          sig = inspect.signature(_linprog_highs)
          default_str = sig.parameters[option_str].default
          warn(
              f"Option {option_str} is {option}, but only values in "
              f"{set(choices.keys())} are allowed. Using default: "
              f"{default_str}.",
              OptimizeWarning,
              stacklevel=3,
          )
          return choices[default_str]
  
file_path: catboost/contrib/python/scipy/py3/scipy/optimize/_linprog_highs.py
imports: import inspect
  import numpy
  from .optimize import _check_unknown_options, OptimizeWarning, OptimizeResult
  from warnings import warn
  from ._highs._highs_wrapper import _highs_wrapper
  from ._highs._highs_constants import CONST_I_INF, CONST_INF, MESSAGE_LEVEL_MINIMAL, MODEL_STATUS_NOTSET, MODEL_STATUS_LOAD_ERROR, MODEL_STATUS_MODEL_ERROR, MODEL_STATUS_PRESOLVE_ERROR, MODEL_STATUS_SOLVE_ERROR, MODEL_STATUS_POSTSOLVE_ERROR, MODEL_STATUS_MODEL_EMPTY, MODEL_STATUS_PRIMAL_INFEASIBLE, MODEL_STATUS_PRIMAL_UNBOUNDED, MODEL_STATUS_OPTIMAL, MODEL_STATUS_REACHED_DUAL_OBJECTIVE_VALUE_UPPER_BOUND, MODEL_STATUS_REACHED_TIME_LIMIT, MODEL_STATUS_REACHED_ITERATION_LIMIT, MODEL_STATUS_PRIMAL_DUAL_INFEASIBLE, MODEL_STATUS_DUAL_INFEASIBLE, HIGHS_SIMPLEX_STRATEGY_CHOOSE, HIGHS_SIMPLEX_STRATEGY_DUAL, HIGHS_SIMPLEX_CRASH_STRATEGY_OFF, HIGHS_SIMPLEX_DUAL_EDGE_WEIGHT_STRATEGY_CHOOSE, HIGHS_SIMPLEX_DUAL_EDGE_WEIGHT_STRATEGY_DANTZIG, HIGHS_SIMPLEX_DUAL_EDGE_WEIGHT_STRATEGY_DEVEX, HIGHS_SIMPLEX_DUAL_EDGE_WEIGHT_STRATEGY_STEEPEST_EDGE
  from scipy.sparse import csc_matrix, vstack, issparse
label_desc: Use image node_id 2 for calling a global function with example usage: _convert_to_highs_enum(option, option_str, choices) and returns: choices, choices, choices