code: def get_resnet_file(name, root="~/.torch/models"):
      file_name = "{name}-{short_hash}".format(
          name=name, short_hash=short_hash(name)
      )
      root = os.path.expanduser(root)
  
      file_path = os.path.join(root, file_name + ".pth")
      sha1_hash = _model_sha1[name]
      if os.path.exists(file_path):
          if check_sha1(file_path, sha1_hash):
              return file_path
          else:
              print(
                  "Mismatch in the content of model file {} detected. Downloading again.".format(
                      file_path
                  )
              )
      else:
          print(
              "Model file {} is not found. Downloading.".format(
                  file_path
              )
          )
  
      if not os.path.exists(root):
          os.makedirs(root)
  
      zip_file_path = os.path.join(root, file_name + ".zip")
      repo_url = os.environ.get("ENCODING_REPO", encoding_repo_url)
      if repo_url[-1] != "/":
          repo_url = repo_url + "/"
      download(
          _url_format.format(repo_url=repo_url, file_name=file_name),
          path=zip_file_path,
          overwrite=True,
      )
      with zipfile.ZipFile(zip_file_path) as zf:
          zf.extractall(root)
      os.remove(zip_file_path)
  
      if check_sha1(file_path, sha1_hash):
          return file_path
      else:
          raise ValueError(
              "Downloaded file has different hash. Please try again."
          )
  
imports: import os
  import zipfile
  from .download import download, check_sha1
label_desc: Use image node_id 2 for calling a global function with example usage: get_resnet_file(name, root) and returns: file_path, file_path