code: def test_lower_bound_nguyen_wainwright_jordan(self):
      # Numerical test against theoretical values
      nwj_bound = self.evaluate(
          mi.lower_bound_nguyen_wainwright_jordan(self.optimal_critic)
      )
      self.assertAllInRange(
          nwj_bound,
          lower_bound=self.theoretical_mi - LOWER_BOUND_MIN_GAP,
          upper_bound=self.theoretical_mi + LOWER_BOUND_MAX_GAP,
      )
  
      # Check the masked against none masked version
      nwj_bound_1 = mi.lower_bound_nguyen_wainwright_jordan(self.scores)
      positive_mask = np.eye(self.scores.shape[0], self.scores.shape[1])
      nwj_bound_2 = self.evaluate(
          mi.lower_bound_nguyen_wainwright_jordan(
              self.scores, positive_mask, validate_args=True
          )
      )
      self.assertAllClose(nwj_bound_1, nwj_bound_2)
  
      # Check batched against none batched version
      nwj_bound_3 = self.evaluate(
          mi.lower_bound_nguyen_wainwright_jordan(
              tf.tile(self.scores[tf.newaxis, :, :], [3, 1, 1])
          )
      )
      self.assertAllClose(
          nwj_bound_3, self.evaluate(tf.tile(nwj_bound_1[None,], [3]))
      )
  
file_path: probability/tensorflow_probability/python/vi/mutual_information_test.py
imports: import numpy
  import scipy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.vi import mutual_information
label_desc: Use image node_id 8 for calling the MutualInformationTest obj's underlying member method code with example usage: obj.test_lower_bound_nguyen_wainwright_jordan() without return types