215a216
> # This loops until all objects have been fully drained.
216a218,227
> all_drained = drain(root)
> while (not all_drained):
> all_drained = drain(root)
>
> # Tries to drain all objects. Draining might not be completed unless
> # all objects return that they are drained on the first call. This is
> # because as objects drain they may cause other objects to no longer
> # be drained.
> def drain(root):
> all_drained = False
222a234,235
> else:
> all_drained = True
223a237
> return all_drained