<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def color_for_thread(thread_id):
 """ Associates the thread ID with the next color in the `thread_colors` cycle, so that thread-specific parts of a log have a consistent separate color. """

    if thread_id not in seen_thread_colors:
        seen_thread_colors[thread_id] = next(thread_colors)

    return seen_thread_colors[thread_id]