code: def _eigh(A, B=None):
      """
      Helper function for converting a generalized eigenvalue problem
      A(X) = lambda(B(X)) to standard eigen value problem using cholesky
      transformation
      """
      if B is None:  # use cupy's eigh in standard case
          vals, vecs = linalg.eigh(A)
          return vals, vecs
      R = _cholesky(B)
      RTi = linalg.inv(R)
      Ri = linalg.inv(R.T)
      F = cupy.matmul(RTi, cupy.matmul(A, Ri))
      vals, vecs = linalg.eigh(F)
      eigVec = cupy.matmul(Ri, vecs)
      return vals, eigVec
  
file_path: cupy/cupyx/scipy/sparse/linalg/_lobpcg.py
imports: import warnings
  import numpy
  import cupy
  import cupy.linalg
  from cupyx.scipy.sparse import linalg
label_desc: Use image node_id 9 for calling a global function with example usage: _eigh(A, B) and returns: vals,  eigVec, vals,  vecs