code: def execute_with_retries(self, action, f):
          
          # Run action until either it succeeds or throws an exception
          # that's not an ActionRetryException
          retry = True
          while retry:
              retry = False
              try:
                  f(action)
              except ActionRetryException as ex:  # other exceptions should bubble out
                  retry = True
                  time.sleep(ex.ms_backoff / 1000.0)
docs: Execute function f with single argument action. Retry if
          ActionRetryException is raised.