def check_arg_in_support(f):
@functools.wraps(f)<EOL>def _check_arg_and_apply_f(*args, **kwargs):<EOL><INDENT>dist = args[<NUM_LIT:0>]<EOL>x = args[<NUM_LIT:1>]<EOL>with tf.control_dependencies([<EOL>assert_util.assert_greater_equal(<EOL>x, dist.loc, message="<STR_LIT>")<EOL>] if dist.validate_args else []):<EOL><INDENT>return f(*args, **kwargs)<EOL><DEDENT><DEDENT>return _check_arg_and_apply_f<EOL>
Decorator function for argument bounds checking.

    This decorator is meant to be used with methods that require the first
    argument to be in the support of the distribution. If `validate_args` is
    `True`, the method is wrapped with an assertion that the first argument is
    greater than or equal to `loc`, since the support of the half-Cauchy
    distribution is given by `[loc, infinity)`.


    Args:
      f: method to be decorated.

    Returns:
      Returns a decorated method that, when `validate_args` attribute of the class
      is `True`, will assert that all elements in the first argument are within
      the support of the distribution before executing the original method.