code: def _sym_ortho(a, b):
      """
      Stable implementation of Givens rotation.
  
      Notes
      -----
      The routine 'SymOrtho' was added for numerical stability. This is
      recommended by S.-C. Choi in [1]_.  It removes the unpleasant potential of
      ``1/eps`` in some important places (see, for example text following
      "Compute the next plane rotation Qk" in minres.py).
  
      References
      ----------
      .. [1] S.-C. Choi, "Iterative Methods for Singular Linear Equations
             and Least-Squares Problems", Dissertation,
             http://www.stanford.edu/group/SOL/dissertations/sou-cheng-choi-thesis.pdf
  
      """
      if b == 0:
          return np.sign(a), 0, abs(a)
      elif a == 0:
          return 0, np.sign(b), abs(b)
      elif abs(b) > abs(a):
          tau = a / b
          s = np.sign(b) / sqrt(1 + tau * tau)
          c = s * tau
          r = b / s
      else:
          tau = b / a
          c = np.sign(a) / sqrt(1 + tau * tau)
          s = c * tau
          r = a / c
      return c, s, r
  
imports: import numpy
  from math import sqrt
  from scipy.sparse.linalg._interface import aslinearoperator
label_desc: Use image node_id 1 for calling a global function with example usage: _sym_ortho(a, b) and returns: c,  s,  r, np,  int,  abs, int,  np,  abs