Retry logic for RPC operations that may fail when no nodes are available.
@spec with_retry( keyword(), (-> result) ) :: result when result: any()