'Run ``call`` method until it\'s not rate-limited.
The method is invoked while it returns 503 Service Unavailable or the
allowed number of retries is reached.
:param callable call: Method to be decorated.'

def __call__(self, call):

    def wrapper(*args, **kwargs):
        last_exception = None
        for i in range((self.retries + 1)):
            try:
                return call(*args, **kwargs)
            except ServiceUnavailableError as e:
                last_exception = e
                time.sleep(self.sleep)
        raise last_exception
    update_wrapper(wrapper, call)
    return wrapper
