<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_active_sessions(self):
 """ Retrieves the active, unexpired sessions. :Returns: A generator of :class:`~mwsessions.Session` """

        for last_timestamp, i, events in self.recently_active:
            yield Session(events[-1].user, unpack_events(events))