code: def testBijectorConditionKwargs(self):
      batch_size = 3
      x_ = (
          np.linspace(-1.0, 1.0, (batch_size * 4 * 2))
          .astype(np.float32)
          .reshape((batch_size, 4 * 2))
      )
  
      conditions = {
          "a": np.random.normal(size=(batch_size, 4)).astype(
              np.float32
          ),
          "b": np.random.normal(size=(batch_size, 4)).astype(
              np.float32
          ),
      }
  
      def _condition_shift_and_log_scale_fn(x0, output_units, a, b):
          del output_units
          return x0 + a, x0 + b
  
      nvp = real_nvp.RealNVP(
          num_masked=4,
          validate_args=True,
          is_constant_jacobian=False,
          shift_and_log_scale_fn=_condition_shift_and_log_scale_fn,
      )
  
      x = tf.constant(x_)
  
      forward_x = nvp.forward(x, **conditions)
      # Use identity to invalidate cache.
      inverse_y = nvp.inverse(tf.identity(forward_x), **conditions)
      forward_inverse_y = nvp.forward(inverse_y, **conditions)
      fldj = nvp.forward_log_det_jacobian(
          x, event_ndims=1, **conditions
      )
      # Use identity to invalidate cache.
      ildj = nvp.inverse_log_det_jacobian(
          tf.identity(forward_x), event_ndims=1, **conditions
      )
      [
          forward_x_,
          inverse_y_,
          forward_inverse_y_,
          ildj_,
          fldj_,
      ] = self.evaluate(
          [
              forward_x,
              inverse_y,
              forward_inverse_y,
              ildj,
              fldj,
          ]
      )
      self.assertStartsWith(nvp.name, "real_nvp")
      self.assertAllClose(
          forward_x_, forward_inverse_y_, rtol=1e-5, atol=1e-5
      )
      self.assertAllClose(x_, inverse_y_, rtol=1e-5, atol=1e-5)
      self.assertAllClose(ildj_, -fldj_, rtol=1e-5, atol=1e-5)
  
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 7 for calling the RealNVPTestCommon obj's underlying member method code with example usage: obj.testBijectorConditionKwargs() and returns: unknown,  unknown