<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write(settings_path, settings_data, **kwargs):
 """Write data to .env file"""

    for key, value in settings_data.items():
        dotenv_cli.set_key(str(settings_path), key.upper(), str(value))