code: def confirm_model_dir_url(model_dir, default_model_dir, default_url):
      url = default_url
      if model_dir is None or is_link(model_dir):
          if is_link(model_dir):
              url = model_dir
          file_name = url.split("/")[-1][:-4]
          model_dir = default_model_dir
          model_dir = os.path.join(model_dir, file_name)
      return model_dir, url
  
file_path: PaddleOCR/ppocr/utils/network.py
imports: import os
  import sys
  import tarfile
  import requests
  from tqdm import tqdm
  from ppocr.utils.logging import get_logger
label_desc: Use image node_id 5 for calling a global function with example usage: confirm_model_dir_url(model_dir, default_model_dir, default_url) and returns: model_dir,  url