<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def aitercontext(aiterable, *, cls=AsyncIteratorContext):
 """Return an asynchronous context manager from an asynchronous iterable. The context management makes sure the aclose asynchronous method has run before it exits. It also issues warnings and RuntimeError if it is used incorrectly. It is safe to use with any asynchronous iterable and prevent asynchronous iterator context to be wrapped twice. Correct usage:: ait = some_asynchronous_iterable() async with aitercontext(ait) as safe_ait: async for item in safe_ait: <block> An optional subclass of AsyncIteratorContext can be provided. This class will be used to wrap the given iterable. """

    assert issubclass(cls, AsyncIteratorContext)
    aiterator = aiter(aiterable)
    if isinstance(aiterator, cls):
        return aiterator
    return cls(aiterator)