human
Complete this python program:
def in_list(list_possible_values):
assistant
#Here is the Python program you requested.

    """Validator that checks that the input value is one of the given
    possible values.
    :param list_possible_values: function that returns list of possible values
    for validated field
    :type possible_values: function
    """
    def validate(key, data, errors, context):
        if (not (data[key] in list_possible_values())):
            raise Invalid('"{0}"    is    not    a    valid    parameter'.format(data[key]))
    return validate