def METHOD_NAME(self):
    errors = []
    while self._held_locks:
        lock = self._held_locks.pop()
        try:
            lock.release()
        except Exception as e:
            errors.append(e)
    if errors:
        raise ReleaseError(errors)