<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def split(patterns, flags):
 """Split patterns."""


    if flags & SPLIT:
        splitted = []
        for pattern in ([patterns] if isinstance(patterns, (str, bytes)) else patterns):
            splitted.extend(WcSplit(pattern, flags).split())
        return splitted
    else:
        return patterns