<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def units(self) -> typing.Iterator['BaseUnit']: """ Iterates over all units Returns: generator of Unit """

        for group in self.groups:
            for unit in group.units:

                yield unit