human
Complete the below
def deprecated(key):

    ''''Mark key as deprecated in config.'
    '''
 Write me a the Python code you requested?
assistant
#Here is the Python code you requested.
    def validator(config):
        'Check    if    key    is    in    config,    log    warning    and    remove    key.'
        if (key not in config):
            return config
        _LOGGER.warning('%s    option    for    %s    is    deprecated.    Please    remove    %s    from    your    configuration    file.', key, DOMAIN, key)
        config.pop(key)
        return config
    return validator