code: def _hpsd_solve_bwd(aux, g):
      """Reverse mode impl for hpsd_solve."""
      cholesky_matrix, rhs, solve_rhs = aux
      chol_linop = tf.linalg.LinearOperatorLowerTriangular(
          cholesky_matrix
      )
  
      chol_inv = chol_linop.solve(
          tf.eye(
              chol_linop.domain_dimension_tensor(),
              dtype=chol_linop.dtype,
          )
      )
  
      rhs_grad = tf.linalg.matmul(
          chol_inv, tf.linalg.matmul(chol_inv, g), transpose_a=True
      )
      matrix_grad = -0.5 * (
          tf.linalg.matmul(rhs_grad, solve_rhs, adjoint_b=True)
          + tf.linalg.matmul(solve_rhs, rhs_grad, adjoint_b=True)
      )
  
      matrix_grad, rhs_grad = generic.fix_gradient_for_broadcasting(
          [cholesky_matrix[..., tf.newaxis], rhs[..., tf.newaxis, :]],
          [matrix_grad[..., tf.newaxis], rhs_grad[..., tf.newaxis, :]],
      )
      return (
          tf.squeeze(matrix_grad, axis=-1),
          tf.squeeze(rhs_grad, axis=-2),
          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 26 for calling a global function with example usage: _hpsd_solve_bwd(aux, g) and returns: tf,  tf,  None