code: def test_batch_mask(self):
      d = masked.Masked(
          normal.Normal(tf.zeros([20]), 1),
          tf.sequence_mask([15, 17], 20),
      )
      self.assertEqual((2, 20), d.batch_shape)
      x = np.linspace(-0.1, 0.1, 20).astype(np.float32)
      self.assertAllClose(
          tf.stack(
              [
                  tf.pad(
                      normal.Normal(0, 1).log_prob(x[:15]), [[0, 5]]
                  ),
                  tf.pad(
                      normal.Normal(0, 1).log_prob(x[:17]), [[0, 3]]
                  ),
              ]
          ),
          d.log_prob(x),
      )
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import log_prob_ratio
  from tensorflow_probability.python.distributions import lognormal
  from tensorflow_probability.python.distributions import masked
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import relaxed_onehot_categorical
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 7 for calling the MaskedTest obj's underlying member method code with example usage: obj.test_batch_mask() without return types