parameters: (self, x)
return_statement: return control_flow_ops.with_dependencies([
          check_ops.assert_positive(
              x,
              message="sample must be positive"),
          check_ops.assert_less(
              x, array_ops.ones([], self.dtype),
              message="sample must be no larger than `1`."),
      ], x)
docstring: Checks the validity of a sample.
docstring_summary: Checks the validity of a sample.
docstring_tokens: Checks the validity of a sample .
function: def _maybe_assert_valid_sample(self, x):
      """Checks the validity of a sample."""
      if not self.validate_args:
        return x
      return control_flow_ops.with_dependencies([
          check_ops.assert_positive(
              x,
              message="sample must be positive"),
          check_ops.assert_less(
              x, array_ops.ones([], self.dtype),
              message="sample must be no larger than `1`."),
      ], x)
function_tokens: def _maybe_assert_valid_sample ( self , x ) : if not self . validate_args : return x return control_flow_ops . with_dependencies ( [ check_ops . assert_positive ( x , message = "sample must be positive" ) , check_ops . assert_less ( x , array_ops . ones ( [ ] , self . dtype ) , message = "sample must be no larger than `1`." ) , ] , x )