human
Complete the below
def _RegisterBoundsValidatorIfNeeded(parser, name, flag_values):

    ''''Enforce lower and upper bounds for numeric flags.
    Args:
    parser: NumericParser (either FloatParser or IntegerParser). Provides lower
    and upper bounds, and help text to display.
    name: string, name of the flag
    flag_values: FlagValues'
    '''

=====
Can you provide a the Python program you requested?
assistant
#Here is the Python program you requested.
    if ((parser.lower_bound is not None) or (parser.upper_bound is not None)):
        def Checker(value):
            if ((value is not None) and parser.IsOutsideBounds(value)):
                message = ('%s    is    not    %s' % (value, parser.syntactic_help))
                raise gflags_validators.Error(message)
            return True
        RegisterValidator(name, Checker, flag_values=flag_values)