code: def gershgorin_bounds(H):
      """
      Given a square matrix ``H`` compute upper
      and lower bounds for its eigenvalues (Gregoshgorin Bounds).
      Defined ref. [1].
  
      References
      ----------
      .. [1] Conn, A. R., Gould, N. I., & Toint, P. L.
             Trust region methods. 2000. Siam. pp. 19.
      """
  
      H_diag = np.diag(H)
      H_diag_abs = np.abs(H_diag)
      H_row_sums = np.sum(np.abs(H), axis=1)
      lb = np.min(H_diag + H_diag_abs - H_row_sums)
      ub = np.max(H_diag - H_diag_abs + H_row_sums)
  
      return lb, ub
  
file_path: catboost/contrib/python/scipy/py3/scipy/optimize/_trustregion_exact.py
imports: import numpy
  from scipy.linalg import norm, get_lapack_funcs, solve_triangular, cho_solve
  from ._trustregion import _minimize_trust_region, BaseQuadraticSubproblem
label_desc: Use image node_id 3 for calling a global function with example usage: gershgorin_bounds(H) and returns: lb,  ub