def retry_backoff_delay(attempt, scale_factor=1.0, jitter_max=0.0):
 exp = (float((2 ** attempt)) * float(scale_factor))
 if (jitter_max == 0.0):
  return exp
 return (exp + (random.random() * jitter_max))

def retry_backoff_delay ( attempt , scale_factor = 1.0 , jitter_max = 0.0 ) : exp = ( float ( ( 2 ** attempt ) ) * float ( scale_factor ) ) if ( jitter_max == 0.0 ) : return exp return ( exp + ( random . random ( ) * jitter_max ) )
calculate an exponential backoff delay with jitter .