code: async def accumulate(source, func=op.add, initializer=None):
      
      iscorofunc = asyncio.iscoroutinefunction(func)
      async with streamcontext(source) as streamer:
          # Initialize
          if initializer is None:
              try:
                  value = await anext(streamer)
              except StopAsyncIteration:
                  return
          else:
              value = initializer
          # First value
          yield value
          # Iterate streamer
          async for item in streamer:
              value = func(value, item)
              if iscorofunc:
                  value = await value
              yield value
docs: Generate a series of accumulated sums (or other binary function)
      from an asynchronous sequence.
  
      If ``initializer`` is present, it is placed before the items
      of the sequence in the calculation, and serves as a default
      when the sequence is empty.