<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(pipe, splitter, skip_empty=False):
    ''' this function works a lot like groupby but splits on given patterns,
        the same behavior as str.split provides. if skip_empty is True,
        split only yields pieces that have contents

        Example:

            splitting 1011101010101
            by        10
            returns   ,11,,,,1

        Or if skip_empty is True

            splitting 1011101010101
            by        10
            returns   11,1
    '''

    splitter = tuple(splitter)
    len_splitter = len(splitter)
    pipe=iter(pipe)
    current = deque()
    tmp = []
    windowed = window(pipe, len(splitter))
    for i in windowed:
        if i == splitter:
            skip(windowed, len(splitter)-1)
            yield list(current)
            current.clear()
            tmp = []
        else:
            current.append(i[0])
            tmp = i
    if len(current) or len(tmp):
        yield list(chain(current,tmp))