<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def logevents(self):
 """Iterator yielding all logevents from groups dictionary."""

        for key in self.groups:
            for logevent in self.groups[key]:
                yield logevent