code: def retry_fn(fn: Callable) -> Any:
      ini_time = time.time()
      res = None
      i = 0
      while i < MIN_RETRYS or time.time() - ini_time < GET_RUN_MAX_TIME:
          i += 1
          try:
              res = fn()
              break
          except Exception:
              time.sleep(1)
              continue
      return res
  
imports: import getpass
  import os
  import time
  from functools import partial
  from pathlib import Path
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import click
  import requests
  from pkg_resources import parse_version
  from wandb_gql import gql
  import wandb
  from wandb.sdk.artifacts.artifact import Artifact
  from wandb.sdk.lib import runid
  from ...apis.internal import Api
label_desc: Use image node_id 16 for calling a global function with example usage: retry_fn(fn) and returns: res