<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clear_all_events(self):
 """Clear all event queues and their cached events."""

        self.lock.acquire()
        self.event_dict.clear()
        self.lock.release()