I want to "fork" a stream of a large amount of data, in order to look-ahead just a couple of elements. 

I was hoping to write something like this:

```
from itertools import tee
stream = # a generator of a very large data stream 

while True:
    try:
        element= stream.next()
        process_element( element )
        if some_condition( element ):
            stream, fork= tee(stream)
            process_fork( fork )
    except StopIteration:
        break

```

Reading [the documentation for `tee`](https://docs.python.org/2/library/itertools.html#itertools.tee), though, I'm left with the impression that the `deque` of `fork` will keep growing, even after `fork` has gone out of scope.

Is this the case? If so, is there a way to tell `tee` to "discard" the fork? Or is there another more obvious way of doing this?