def __init__(self, delegate: Iterator[T]):
    assert isinstance(delegate, collections.Iterable)
    if (not isinstance(delegate, collections.Iterator)):
        delegate = iter(delegate)
    self._delegate = delegate
def __init__(self, delegate: Iterator[T]):
    assert isinstance(delegate, collections.Iterable)
    if (not isinstance(delegate, collections.Iterator)):
        delegate = iter(delegate)
    self._delegate = delegate