<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _apply_color(code, content):
 """ Apply a color code to text """


        normal = u'\x1B[0m'
        seq = u'\x1B[%sm' % code

        # Replace any normal sequences with this sequence to support nested colors
        return seq + (normal + seq).join(content.split(normal)) + normal