async def METHOD_NAME(throw, close, expected):
  result = []
  a = async_gen()
  result.append(await a.__anext__())
  a.__aiter__()
  result.append(await a.asend(None))
  if throw:
    try:
      await a.athrow(ZeroDivisionError)
    except Exception as e:
      result.append(type(e))
  if close:
    await a.aclose()
  async for i in a:
    result.append(i)
  assert result == expected,(close, result, expected)
  print(throw, close, "async generator ok")