code: func Backoff(base, max, jitter, factor float64, retries int) time.Duration {
  	if retries == 0 {
  		return 0
  	}
  
  	backoff, max := float64(base), float64(max)
  	for backoff < max && retries > 0 {
  		backoff *= factor
  		retries--
  	}
  	if backoff > max {
  		backoff = max
  	}
  
  	// Randomize backoff delays so that if a cluster of requests start at
  	// the same time, they won't operate in lockstep.
  	backoff *= 1 + jitter*(rand.Float64()*2-1)
  	if backoff < 0 {
  		return 0
  	}
  
  	return time.Duration(backoff)
  }
docs: // Backoff returns a delay with an expontential backoff based on the number of
  // retries. Same algorithm used in gRPC.