code: func RetryBackoff(retries int, base, max time.Duration, factor float64) time.Duration {
  	if retries == 0 {
  		return 0
  	}
  	backoff, fMax := float64(base), float64(max)
  	for backoff < fMax && retries > 1 {
  		backoff *= factor
  		retries--
  	}
  	if backoff > fMax {
  		backoff = fMax
  	}
  	// Randomize backoff delays so that if a cluster of requests start at
  	// the same time, they won't operate in lockstep.
  	backoff *= (1 - retryJitter) + 2*retryJitter*mrand.Float64()
  	return time.Duration(backoff)
  }
docs: // RetryBackoff calculates a backoff time based on number of retries, will always
  // add jitter so requests that start in unison won't fall into lockstep. Because of
  // this the returned duration can always be larger than the maximum by a factor of
  // retryJitter. Adapted from
  // https://github.com/grpc/grpc-go/blob/v1.11.3/backoff.go#L77-L96