def set_setting(key, val, env=None):
    """
    Changes the value of the specified key in the current environment, or in
    another environment if specified.
    """
    return settings.set(key, val, env=env)