<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def SetConsoleTextAttribute(stream_id, attrs):
 """Set a console text attribute."""

    handle = handles[stream_id]
    return windll.kernel32.SetConsoleTextAttribute(handle, attrs)