<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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)