def has_unsent(self):
        """Return whether there is any unsent record in the accumulator."""
        for tp in list(self._batches.keys()):
            with self._tp_locks[tp]:
                dq = self._batches[tp]
                if len(dq):
                    return True
        return False
def has_unsent ( self ) : for tp in list ( self . _batches . keys ( ) ) : with self . _tp_locks [ tp ] : dq = self . _batches [ tp ] if len ( dq ) : return True return False
Return whether there is any unsent record in the accumulator.