code: public static <T> Observable<T> wrapForRetry(Observable<T> source, final RetryWithDelayHandler handler) {
          return source.retryWhen(new RetryWhenFunction(handler));
      }
docs: Wrap an {@link Observable} so that it will retry on some errors. The retry will occur for a maximum number of
  attempts and with a provided {@link Delay} between each attempt represented by the {@link RetryWithDelayHandler},
  which can also filter on errors and stop the retry cycle for certain type of errors.
  
  @param source the {@link Observable} to wrap.
  @param handler the {@link RetryWithDelayHandler}, describes maximum number of attempts, delay and fatal errors.
  @param <T> the type of items emitted by the source Observable.
  @return the wrapped retrying Observable.