from tensorflow.python.ops import math_ops

  @distribution_util.AppendDocstring(
      """Note: when `rate` is an integer, there are actually two modes: `rate`
      and `rate - 1`. In this case we return the larger, i.e., `rate`.""")
  def _mode(self):
    return math_ops.floor(self.rate)

  def _assert_valid_sample(self, x, check_integer=True):
    if not self.validate_args:
