class_docstr: Provides an iterator to yield the results of awaitables as they finish.
  
  Yielding a set of awaitables like this:
  
  ``results = yield [awaitable1, awaitable2]``
  
  pauses the coroutine until both ``awaitable1`` and ``awaitable2``
  return, and then restarts the coroutine with the results of both
  awaitables. If either awaitable raises an exception, the
  expression will raise that exception and all the results will be
  lost.
  
  If you need to get the result of each awaitable as soon as possible,
  or if you need the result of some awaitables even if others produce
  errors, you can use ``WaitIterator``::
  
    wait_iterator = gen.WaitIterator(awaitable1, awaitable2)
    while not wait_iterator.done():
        try:
            result = yield wait_iterator.next()
        except Exception as e:
            print("Error {} from {}".format(e, wait_iterator.current_future))
        else:
            print("Result {} received from {} at {}".format(
                result, wait_iterator.current_future,
                wait_iterator.current_index))
  
  Because results are returned as soon as they are available the
  output from the iterator *will not be in the same order as the
  input arguments*. If you need to know which future produced the
  current result, you can use the attributes
  ``WaitIterator.current_future``, or ``WaitIterator.current_index``
  to get the index of the awaitable from the input list. (if keyword
  arguments were used in the construction of the `WaitIterator`,
  ``current_index`` will use the corresponding keyword).
  
  On Python 3.5, `WaitIterator` implements the async iterator
  protocol, so it can be used with the ``async for`` statement (note
  that in this version the entire iteration is aborted if any value
  raises an exception, while the previous example can continue past
  individual errors)::
  
    async for result in gen.WaitIterator(future1, future2):
        print("Result {} received from {} at {}".format(
            result, wait_iterator.current_future,
            wait_iterator.current_index))
  
  .. versionadded:: 4.1
  
  .. versionchanged:: 4.3
     Added ``async for`` support in Python 3.5.
class_docstr_tok: ["Provides","an","iterator","to","yield","the","results","of","awaitables","as","they","finish",".","Yielding","a","set","of","awaitables","like","this",":","``","results","=","yield","[","awaitable1",",","awaitable2","]","``","pauses","the","coroutine","until","both","``","awaitable1","``","and","``","awaitable2","``","return",",","and","then","restarts","the","coroutine","with","the","results","of","both","awaitables",".","If","either","awaitable","raises","an","exception",",","the","expression","will","raise","that","exception","and","all","the","results","will","be","lost",".","If","you","need","to","get","the","result","of","each","awaitable","as","soon","as","possible",",","or","if","you","need","the","result","of","some","awaitables","even","if","others","produce","errors",",","you","can","use","``","WaitIterator","``",":",":","wait_iterator","=","gen.WaitIterator","(","awaitable1",",","awaitable2",")","while","not","wait_iterator.done","(",")",":","try",":","result","=","yield","wait_iterator.next","(",")","except","Exception","as","e",":","print","(","``","Error","{","}","from","{","}","''",".format","(","e",",","wait_iterator.current_future",")",")","else",":","print","(","``","Result","{","}","received","from","{","}","at","{","}","''",".format","(","result",",","wait_iterator.current_future",",","wait_iterator.current_index",")",")","Because","results","are","returned","as","soon","as","they","are","available","the","output","from","the","iterator","*","will","not","be","in","the","same","order","as","the","input","arguments","*",".","If","you","need","to","know","which","future","produced","the","current","result",",","you","can","use","the","attributes","``","WaitIterator.current_future","``",",","or","``","WaitIterator.current_index","``","to","get","the","index","of","the","awaitable","from","the","input","list",".","(","if","keyword","arguments","were","used","in","the","construction","of","the","`","WaitIterator","`",",","``","current_index","``","will","use","the","corresponding","keyword",")",".","On","Python","3.5",",","`","WaitIterator","`","implements","the","async","iterator","protocol",",","so","it","can","be","used","with","the","``","async","for","``","statement","(","note","that","in","this","version","the","entire","iteration","is","aborted","if","any","value","raises","an","exception",",","while","the","previous","example","can","continue","past","individual","errors",")",":",":","async","for","result","in","gen.WaitIterator","(","future1",",","future2",")",":","print","(","``","Result","{","}","received","from","{","}","at","{","}","''",".format","(","result",",","wait_iterator.current_future",",","wait_iterator.current_index",")",")","..","versionadded",":",":","4.1","..","versionchanged",":",":","4.3","Added","``","async","for","``","support","in","Python","3.5","."]
code: def __aiter__(self) -> typing.AsyncIterator:
      return self
  
imports: import asyncio
  import builtins
  import collections
  from collections.abc import Generator
  import concurrent.futures
  import datetime
  import functools
  from functools import singledispatch
  from inspect import isawaitable
  import sys
  import types
  from tornado.concurrent import Future, is_future, chain_future, future_set_exc_info, future_add_done_callback, future_set_result_unless_cancelled
  from tornado.ioloop import IOLoop
  from tornado.log import app_log
  from tornado.util import TimeoutError
  import typing
  from typing import Union, Any, Callable, List, Type, Tuple, Awaitable, Dict, overload
label_desc: Use image node_id 6 for calling the WaitIterator obj's underlying member method code with example usage: obj.__aiter__() and returns: self