Using decorators for timeouts and retries.