(iterable)
return tuple(
        BufferedIterator(iterator, buffers, index)
        for index in range(len(buffers)))
Converts an iterable of tuples into a tuple of iterators.

    This function converts an iterable of tuples into a tuple of iterators.
    This is an inverse function of :func:`six.moves.zip`.

    >>> from chainercv.utils import unzip
    >>> data = [(0, 'a'), (1, 'b'), (2, 'c'), (3, 'd'), (4, 'e')]
    >>> int_iter, str_iter = unzip(data)
    >>>
    >>> next(int_iter)  # 0
    >>> next(int_iter)  # 1
    >>> next(int_iter)  # 2
    >>>
    >>> next(str_iter)  # 'a'
    >>> next(str_iter)  # 'b'
    >>> next(str_iter)  # 'c'

    Args:
        iterable (iterable): An iterable of tuples. All tuples should have
            the same length.

    Returns:
        tuple of iterators:
        Each iterator corresponds to each element of input tuple.
        Note that each iterator stores values until they are popped.
        To reduce memory usage, it is recommended to delete unused iterators.
Converts an iterable of tuples into a tuple of iterators.
Converts an iterable of tuples into a tuple of iterators .
def unzip(iterable):
    """Converts an iterable of tuples into a tuple of iterators.

    This function converts an iterable of tuples into a tuple of iterators.
    This is an inverse function of :func:`six.moves.zip`.

    >>> from chainercv.utils import unzip
    >>> data = [(0, 'a'), (1, 'b'), (2, 'c'), (3, 'd'), (4, 'e')]
    >>> int_iter, str_iter = unzip(data)
    >>>
    >>> next(int_iter)  # 0
    >>> next(int_iter)  # 1
    >>> next(int_iter)  # 2
    >>>
    >>> next(str_iter)  # 'a'
    >>> next(str_iter)  # 'b'
    >>> next(str_iter)  # 'c'

    Args:
        iterable (iterable): An iterable of tuples. All tuples should have
            the same length.

    Returns:
        tuple of iterators:
        Each iterator corresponds to each element of input tuple.
        Note that each iterator stores values until they are popped.
        To reduce memory usage, it is recommended to delete unused iterators.
    """

    iterator = iter(iterable)
    values = next(iterator)
    buffers = [collections.deque((val,)) for val in values]
    return tuple(
        BufferedIterator(iterator, buffers, index)
        for index in range(len(buffers)))
def unzip ( iterable ) : iterator = iter ( iterable ) values = next ( iterator ) buffers = [ collections . deque ( ( val , ) ) for val in values ] return tuple ( BufferedIterator ( iterator , buffers , index ) for index in range ( len ( buffers ) ) )