code: def _b_orthonormalize(
      B, blockVectorV, blockVectorBV=None, retInvR=False
  ):
      if blockVectorBV is None:
          if B is not None:
              blockVectorBV = B(blockVectorV)
          else:
              blockVectorBV = blockVectorV  # Shared data!!!
      gramVBV = np.dot(blockVectorV.T.conj(), blockVectorBV)
      gramVBV = cholesky(gramVBV)
      gramVBV = inv(gramVBV, overwrite_a=True)
      # gramVBV is now R^{-1}.
      blockVectorV = np.dot(blockVectorV, gramVBV)
      if B is not None:
          blockVectorBV = np.dot(blockVectorBV, gramVBV)
  
      if retInvR:
          return blockVectorV, blockVectorBV, gramVBV
      else:
          return blockVectorV, blockVectorBV
  
file_path: catboost/contrib/python/scipy/py2/scipy/sparse/linalg/eigen/lobpcg/lobpcg.py
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from numpy.testing import assert_allclose
  from scipy._lib.six import xrange
  from scipy.linalg import inv, eigh, cho_factor, cho_solve, cholesky
  from scipy.sparse.linalg import aslinearoperator, LinearOperator
  from scipy.sparse.sputils import bmat
label_desc: Use image node_id 6 for calling a global function with example usage: _b_orthonormalize(B, blockVectorV, blockVectorBV, retInvR) and returns: blockVectorV,  blockVectorBV,  gramVBV, blockVectorV,  blockVectorBV