def update_config(config, **kwargs):
    """
    Update config attributes with key-value in kwargs.

    Keys not in config will be ignored.
    """
    for key in kwargs:
        if not hasattr(config, key):
            print('Ignore unknown attribute {}.'.format(key))
        else:
            setattr(config, key, kwargs[key])
            print('Attribute {} has been updated.'.format(key))
    return config
