<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _compile(pattern, flags):
 """Compile the pattern to regex."""


    return re.compile(WcParse(pattern, flags & FLAG_MASK).parse())