<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_delimited(delimiters, split_by, text):
 """ Generator that walks the ``text`` and splits it into an array on ``split_by``, being careful not to break inside a delimiter pair. ``delimiters`` should be an even-length string with each pair of matching delimiters listed together, open first. [''] ['foo', 'bar'] ['foo', '[bar, baz]'] ['{Type Name}', 'name', 'Desc'] ['[{foo,[bar, baz]}]'] Two adjacent delimiters result in a zero-length string between them: ['{Type Name}', '', 'Desc'] ``split_by`` may be a predicate function instead of a string, in which case it should return true on a character to split. ['', '', 'foo', '', 'bar', '', 'baz', '', '', ''] """

    delims = [0] * (old_div(len(delimiters), 2))
    actions = {}
    for i in range(0, len(delimiters), 2):
        actions[delimiters[i]] = (old_div(i, 2), 1)
        actions[delimiters[i + 1]] = (old_div(i, 2), -1)

    if isinstance(split_by, str):
        def split_fn(c): return c == split_by
    else:
        split_fn = split_by
    last = 0

    for i in range(len(text)):
        c = text[i]
        if split_fn(c) and not any(delims):
            yield text[last:i]
            last = i + 1
        try:
            which, dir = actions[c]
            delims[which] = delims[which] + dir
        except KeyError:
            pass # Normal character
    yield text[last:]