human
Complete this python program:
def compat_tee(iterable):
assistant
#Here is the Python code you requested.

    """Return two independent iterators from a single iterable.
    Based on http://www.python.org/doc/2.3.5/lib/itertools-example.html
    """
    def gen(next, data={}, cnt=[0]):
        dpop = data.pop
        for i in itertools.count():
            if (i == cnt[0]):
                item = data[i] = next()
                cnt[0] += 1
            else:
                item = dpop(i)
            (yield item)
    next = iter(iterable).next
    return (gen(next), gen(next))