<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def notify_batches_finished(self, statuses):
 """Called by the BatchTracker the _BatchWaiter is observing. Should not be called by handlers. Args: statuses (dict of int):
 A dict with keys of batch ids, and values of status enums """

        with self._wait_condition:
            self._statuses = statuses
            self._wait_condition.notify()