code: def _quadmin(a, fa, fpa, b, fb):
      """
      Finds the minimizer for a quadratic polynomial that goes through
      the points (a,fa), (b,fb) with derivative at a of fpa.
  
      """
      # f(x) = B*(x-a)^2 + C*(x-a) + D
      with np.errstate(divide="raise", over="raise", invalid="raise"):
          try:
              D = fa
              C = fpa
              db = b - a * 1.0
              B = (fb - D - C * db) / (db * db)
              xmin = a - C / (2.0 * B)
          except ArithmeticError:
              return None
      if not np.isfinite(xmin):
          return None
      return xmin
  
file_path: catboost/contrib/python/scipy/py3/scipy/optimize/linesearch.py
imports: from warnings import warn
  from scipy.optimize import minpack2
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: _quadmin(a, fa, fpa, b, fb) and returns: xmin, None, None