code: def test_scale_matvec_diag(self):
      z = tf.zeros([2])
      self.assertAllClose(
          (np.log([3.0, 2]) - np.log([2.0, 7])).sum(),
          ldj_ratio.forward_log_det_jacobian_ratio(
              scale_matvec_diag.ScaleMatvecDiag([3.0, 2]),
              z,
              scale_matvec_diag.ScaleMatvecDiag([-2.0, 7]),
              z,
              event_ndims=1,
          ),
      )
      self.assertAllClose(
          (np.log([2.0, 7]) - np.log([3.0, 2])).sum(),
          ldj_ratio.inverse_log_det_jacobian_ratio(
              scale_matvec_diag.ScaleMatvecDiag([3.0, 2]),
              z,
              scale_matvec_diag.ScaleMatvecDiag([-2.0, 7]),
              z,
              event_ndims=1,
          ),
      )
  
file_path: probability/tensorflow_probability/python/bijectors/ldj_ratio_test.py
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.bijectors import ldj_ratio
  from tensorflow_probability.python.bijectors import reciprocal
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.bijectors import scale_matvec_diag
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 3 for calling the LdjRatioTest obj's underlying member method code with example usage: obj.test_scale_matvec_diag() without return types