<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_event(self, event, prepend=False):
 """ Adds an event to the manager. """

        if prepend:
            self._events.insert(0, event)
        else:
            self._events.append(event)