code: def download_pretrained_files(model_name, location):
      model_type = model_name.split("-")[0]
      print("model name is {}".format(model_name))
      location = location / model_name
      print("location is {}".format(location))
      location.mkdir(exist_ok=True)
      # download vocab files
      try:
          file_path = PRETRAINED_VOCAB_FILES_MAP[model_name]
          print("file path is {}".format(file_path))
          if model_type == "bert":
              file_name = "vocab.txt"
          if model_type == "distilbert":
              file_name = "vocab.txt"
          elif model_type == "xlnet":
              file_name = "spiece.model"
          elif model_type == "roberta":
              file_name = "vocab.json"
  
          target_path = location / file_name
          http_get(file_path, target_path)
  
      except:
          print(
              "error downloading model vocab {} for  model {}".format(
                  file_path, model_name
              )
          )
  
      # download vocab merge file for Roberta
      if model_type == "roberta":
          try:
              file_path = PRETRAINED_VOCAB_MERGES_MAP[model_name]
              print(file_path)
              file_name = "merges.txt"
              target_path = location / file_name
              http_get(file_path, target_path)
  
          except:
              print(
                  "error downloading model merge file for {}".format(
                      model_name
                  )
              )
  
      # download model files
      try:
          file_path = BERT_PRETRAINED_MODEL_ARCHIVE_MAP[model_name]
          print(file_path)
          file_name = "pytorch_model.bin"
          target_path = location / file_name
          http_get(file_path, target_path)
  
      except:
          print(
              "error downloading model file for {}".format(model_name)
          )
  
      # download config files
      try:
          file_path = BERT_PRETRAINED_CONFIG_ARCHIVE_MAP[model_name]
          print(file_path)
          file_name = "config.json"
          target_path = location / file_name
          http_get(file_path, target_path)
  
      except:
          print(
              "error downloading model config for {}".format(model_name)
          )
  
imports: import argparse
  from pathlib import Path
  from tqdm import tqdm
  import requests
  import urllib3
label_desc: Use image node_id 2 for calling a global function with example usage: download_pretrained_files(model_name, location) without return types