code: def _hpsd_quadratic_form_solvevec_bwd(aux, g):
      """Reverse mode impl for hpsd_quadratic_form_solvevec."""
      cholesky_matrix, rhs, solve_rhs = aux
      chol_linop = tf.linalg.LinearOperatorLowerTriangular(
          cholesky_matrix
      )
      full_solve = chol_linop.solvevec(solve_rhs, adjoint=True)
      matrix_grad = (
          -full_solve[..., tf.newaxis, :] * full_solve[..., tf.newaxis]
      )
      rhs_grad = 2.0 * full_solve
  
      matrix_grad, rhs_grad = generic.fix_gradient_for_broadcasting(
          [cholesky_matrix, rhs[..., tf.newaxis]],
          [
              matrix_grad * g[..., tf.newaxis, tf.newaxis],
              (rhs_grad * g[..., tf.newaxis])[..., tf.newaxis],
          ],
      )
      return matrix_grad, tf.squeeze(rhs_grad, axis=-1), None
  
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import custom_gradient
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.math import generic
label_desc: Use image node_id 37 for calling a global function with example usage: _hpsd_quadratic_form_solvevec_bwd(aux, g) and returns: matrix_grad,  tf,  None