code: def notify_batches_finished(self, statuses):
          
          with self._wait_condition:
              self._statuses = statuses
              self._wait_condition.notify()
docs: 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