retry_delay should accept callable and generator to produce the delay time dynamically on each attempt.