def SetConsoleTextAttribute(stream_id, attrs):
    """Set a console text attribute."""
    handle = handles[stream_id]
    return windll.kernel32.SetConsoleTextAttribute(handle, attrs)
Set a console text attribute.