pub fn with_retry<T, F>(f: F, max_retries: u32) -> Result<T, ScpError>where F: Fn() -> Result<T, ScpError>,