def back_off_until(self):
        """Returns the back off value as a datetime. Resets the current back off value if it has expired."""
        if self._back_off_until is None:
            return None
        with self._back_off_lock:
            if self._back_off_until is None:
                return None
            if self._back_off_until < datetime.datetime.now():
                self._back_off_until = None  # The backoff value has expired. Reset
                return None
            return self._back_off_until
Returns the back off value as a datetime. Resets the current back off value if it has expired.