code: def _download_to_cache_if_url(cfg, file_path: str) -> str:
      from vissl.utils.checkpoint import get_checkpoint_folder
      from vissl.utils.io import cache_url, is_url
  
      if is_url(file_path):
          checkpoint_dir = get_checkpoint_folder(cfg)
          cache_dir = os.path.join(checkpoint_dir, "params_file_cache")
          return cache_url(url=file_path, cache_dir=cache_dir)
      return file_path
  
imports: import contextlib
  import copy
  import logging
  import math
  import os
  import pprint
  import re
  import sys
  from typing import Any, List, NamedTuple, Tuple
  import torch
  from hydra.core.override_parser.overrides_parser import OverridesParser
  from omegaconf import DictConfig, OmegaConf, open_dict
  from vissl.config import AttrDict, check_cfg_version
  from vissl.utils.io import save_file
  from vissl.utils.misc import is_augly_available
label_desc: Use image node_id 18 for calling a global function with example usage: _download_to_cache_if_url(cfg, file_path) and returns: file_path, cache_url