class_docstr: Pads a value to the `event_shape` of a `Tensor`.
  
  The semantics of `tfp.bijectors.Pad` generally follow that of `tf.pad()`
  except that `tfp.bijectors.Pad`'s `paddings` argument applies to the rightmost
  dimensions. Additionally, the new argument `axis` enables overriding the
  dimensions to which `paddings` is applied. Like `paddings`, the `axis`
  argument is also relative to the rightmost dimension and must therefore be
  negative.
  
  The argument `paddings` is a vector of `int` pairs each representing the
  number of left and/or right `constant_values` to pad to the corresponding
  righmost dimensions. That is, unless `axis` is specified, specifiying `k`
  different `paddings` means the rightmost `k` dimensions will be "grown" by the
  sum of the respective `paddings` row. When `axis` is specified, it indicates
  the dimension to which the corresponding `paddings` element is applied. By
  default `axis` is `None` which means it is logically equivalent to
  `range(start=-len(paddings), limit=0)`, i.e., the rightmost dimensions.
  
  Example usage:
  
  ```python
  b = tfp.bijectors.Pad()  # Default arguments.
  
  b.forward([3., 4.])      # shape: [2]
  # ==> [[3., 4., 0.]]     # shape: [3]
  
  b.forward([[1., 2.],
             [3., 4.]])    # shape: [2, 2]
  # ==> [[1., 2., 0.],
  #      [3., 4., 0.]]     # shape: [2, 3]
  
  b.inverse([3., 4., 0.])  # shape: [3]
  # ==> [3., 4.]           # shape: [2]
  
  b.forward_log_det_jacobian(any_value)
  # ==> 0.
  
  b.inverse_log_det_jacobian(any_value)
  # ==> 0.
  ```
  
  ```python
  b = tfp.bijectors.Pad(axis=-2)  # With non-default `axis` arg.
  
  b.forward([[3., 4.]])    # shape: [1, 2]
  # ==> [[3., 4.],         # shape: [2, 2]
  #      [0., 0.]]
  
  b.inverse([[3., 4.],     # shape: [2, 2]
             [0., 0.]])
  # ==> [[3., 4.]]         # shape: [1, 2]
  
  b.forward_log_det_jacobian(any_value)
  # ==> 0.
  
  b.inverse_log_det_jacobian(any_value)
  # ==> 0.
  ```
code: def _parameter_control_dependencies(self, is_init):
      assertions = []
  
      axis = None
      paddings = None
  
      if is_init != tensor_util.is_ref(self.axis):
          # First we check the shape of the axis argument.
          msg = "Argument `axis` must be scalar or vector."
          if tensorshape_util.rank(self.axis.shape) is not None:
              if tensorshape_util.rank(self.axis.shape) > 1:
                  raise ValueError(msg)
          elif self.validate_args:
              if axis is None:
                  axis = tf.convert_to_tensor(self.axis)
              assertions.append(
                  assert_util.assert_rank_at_most(axis, 1, message=msg)
              )
          # Next we check the values of the axis argument.
          axis_ = tf.get_static_value(self.axis)
          msg = "Argument `axis` must be negative."
          if axis_ is not None:
              if np.any(axis_ > -1):
                  raise ValueError(msg)
          elif self.validate_args:
              if axis is None:
                  axis = tf.convert_to_tensor(self.axis)
              assertions.append(
                  assert_util.assert_less(axis, 0, message=msg)
              )
          msg = "Argument `axis` elements must be unique."
          if axis_ is not None:
              if len(np.array(axis_).reshape(-1)) != len(
                  np.unique(axis_)
              ):
                  raise ValueError(msg)
          elif self.validate_args:
              if axis is None:
                  axis = tf.convert_to_tensor(self.axis)
              assertions.append(
                  assert_util.assert_equal(
                      ps.size0(axis),
                      ps.size0(ps.setdiff1d(axis)),
                      message=msg,
                  )
              )
  
      if is_init != tensor_util.is_ref(self.paddings):
          # First we check the shape of the paddings argument.
          msg = "Argument `paddings` must be a vector of pairs."
          if tensorshape_util.is_fully_defined(self.paddings.shape):
              shape = np.int32(self.paddings.shape)
              if len(shape) != 2 or shape[0] < 1 or shape[1] != 2:
                  raise ValueError(msg)
          elif self.validate_args:
              if paddings is None:
                  paddings = tf.convert_to_tensor(self.paddings)
              with tf.control_dependencies(
                  [
                      assert_util.assert_equal(
                          tf.rank(paddings), 2, message=msg
                      )
                  ]
              ):
                  shape = tf.shape(paddings)
                  assertions.extend(
                      [
                          assert_util.assert_greater(
                              shape[0], 0, message=msg
                          ),
                          assert_util.assert_equal(
                              shape[1], 2, message=msg
                          ),
                      ]
                  )
          # Next we check the values of the paddings argument.
          paddings_ = tf.get_static_value(self.paddings)
          msg = "Argument `paddings` must be non-negative."
          if paddings_ is not None:
              if np.any(paddings_ < 0):
                  raise ValueError(msg)
          elif self.validate_args:
              if paddings is None:
                  paddings = tf.convert_to_tensor(self.paddings)
              assertions.append(
                  assert_util.assert_greater(paddings, -1, message=msg)
              )
  
      if is_init != (
          tensor_util.is_ref(self.axis)
          and tensor_util.is_ref(self.paddings)
      ):
          axis_ = tf.get_static_value(self.axis)
          if axis_ is None and axis is None:
              axis = tf.convert_to_tensor(self.axis)
          len_axis = ps.size0(
              ps.reshape(axis if axis_ is None else axis_, shape=-1)
          )
  
          paddings_ = tf.get_static_value(self.paddings)
          if paddings_ is None and paddings is None:
              paddings = tf.convert_to_tensor(self.paddings)
          len_paddings = ps.size0(
              paddings if paddings_ is None else paddings_
          )
  
          msg = (
              "Arguments `axis` and `paddings` must have the same number "
              "of elements."
          )
          if ps.is_numpy(len_axis) and ps.is_numpy(len_paddings):
              if len_axis != len_paddings:
                  raise ValueError(
                      msg
                      + " Saw: {}, {}.".format(self.axis, self.paddings)
                  )
          elif self.validate_args:
              assertions.append(
                  assert_util.assert_equal(
                      len_axis, len_paddings, message=msg
                  )
              )
  
      return assertions
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 15 for calling the Pad obj's underlying member method code with example usage: obj._parameter_control_dependencies(is_init) and returns: assertions