code: def testReverseMask(self, num_masked, fraction_masked, batch_shape):
      input_depth = 8
      x_ = np.random.normal(
          0.0, 1.0, batch_shape + (input_depth,)
      ).astype(np.float32)
      flip_nvp = real_nvp.RealNVP(
          num_masked=num_masked,
          fraction_masked=fraction_masked,
          validate_args=True,
          **self._real_nvp_kwargs,
      )
      x = tf.constant(x_)
  
      forward_x = flip_nvp.forward(x)
  
      expected_num_masked = (
          num_masked
          if num_masked is not None
          else np.floor(input_depth * fraction_masked)
      )
  
      self.assertEqual(flip_nvp._masked_size, expected_num_masked)
  
      _, x2_ = np.split(
          x_, [input_depth - abs(flip_nvp._masked_size)], axis=-1
      )  # pylint: disable=unbalanced-tuple-unpacking
  
      # Check latter half is the same after passing thru reversed mask RealNVP.
      _, forward_x2 = tf.split(
          forward_x,
          [
              input_depth - abs(flip_nvp._masked_size),
              abs(flip_nvp._masked_size),
          ],
          axis=-1,
      )
      self.evaluate(tf1.global_variables_initializer())
      forward_x2_ = self.evaluate(forward_x2)
  
      self.assertAllClose(forward_x2_, x2_, rtol=1e-4, atol=0.0)
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import inline
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.bijectors import real_nvp
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.bijectors import shift
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import sample
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.internal import tf_keras
label_desc: Use image node_id 2 for calling the RealNVPTestBase obj's underlying member method code with example usage: obj.testReverseMask(num_masked, fraction_masked, batch_shape) without return types