<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def happenings(self, *, nations=None, regions=None, filters=None, beforeid=None, beforetime=None):
 """Iterate through happenings from newest to oldest. Parameters nations : iterable of str Nations happenings of which will be requested. Cannot be specified at the same time with ``regions``. regions : iterable of str Regions happenings of which will be requested. Cannot be specified at the same time with ``nations``. filters : iterable of str Categories to request happenings by. Available filters are: ``law``, ``change``, ``dispatch``, ``rmb``, ``embassy``, ``eject``, ``admin``, ``move``, ``founding``, ``cte``, ``vote``, ``resolution``, ``member``, and ``endo``. beforeid : int Only request happenings before this id. beforetime : :class:`datetime.datetime` Only request happenings that were emitted before this moment. Returns ------- an asynchronous iterator yielding any of the classes from \ the :mod:`~aionationstates.happenings` module """

        while True:
            happening_bunch = await self._get_happenings(
                nations=nations, regions=regions, filters=filters,
                beforeid=beforeid, beforetime=beforetime
            )
            for happening in happening_bunch:
                yield happening
            if len(happening_bunch) < 100:
                break
            beforeid = happening_bunch[-1].id