<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ansi_len(string):
 """Extra length due to any ANSI sequences in the string."""

    return len(string) - wcswidth(re.compile(r'\x1b[^m]*m').sub('', string))