def future(self):
    with self._condition:
        while True:
            if (self._passed_other_stuff is not None):
                raise ValueError('Test callback passed unexpected values: %s', self._passed_other_stuff)
            elif self._called:
                return self._passed_future
            else:
                self._condition.wait()
def future(self):
    with self._condition:
        while True:
            if (self._passed_other_stuff is not None):
                raise ValueError('Test callback passed unexpected values: %s', self._passed_other_stuff)
            elif self._called:
                return self._passed_future
            else:
                self._condition.wait()