code: def calculateSleepTime(attempt):
      
      if attempt <= 0:
          return 0
  
      # We subtract one to get exponents: 1, 2, 3, 4, 5, ..
      delay = float(2 ** (attempt - 1)) * float(DELAY_FACTOR)
      # Apply randomization factor
      delay = delay * (RANDOMIZATION_FACTOR * (random.random() * 2 - 1) + 1)
      # Always limit with a maximum delay
      return min(delay, MAX_DELAY)
docs: From the go client
      https://github.com/taskcluster/go-got/blob/031f55c/backoff.go#L24-L29