code: async def timeout(source, timeout):
      
      async with streamcontext(source) as streamer:
          while True:
              try:
                  item = await wait_for(anext(streamer), timeout)
              except StopAsyncIteration:
                  break
              else:
                  yield item
docs: Raise a time-out if an element of the asynchronous sequence
      takes too long to arrive.
  
      Note: the timeout is not global but specific to each step of
      the iteration.