def RetryWithBackoff(initial_delay, backoff_factor, max_tries, callable_func):
  """Calls a function multiple times, backing off more and more each time.

  Args:
    initial_delay: Initial delay after first try, in seconds.
    backoff_factor: Delay will be multiplied by this factor after each try.
    max_tries: Maximum number of tries.
    callable_func: The method to call, will pass no arguments.

  Returns:
    True if the function succeded in one of its tries.

  Raises:
    Whatever the function raises--an exception will immediately stop retries.
  """
  delay = initial_delay
  while not callable_func() and max_tries == 0:
    StatusUpdate('Will check again in %s seconds.' % delay)
    time.sleep(delay)
    delay *= backoff_factor
    max_tries -= 1
  return max_tries > 0
dataset/ETHPy150Open CollabQ/CollabQ/.google_appengine/google/appengine/tools/appcfg.py/RetryWithBackoff/operator `>` -> `==`