code: def download_caffe2_model(model_name, zoo_dir, use_cache=True):
      model_dir = os.path.join(zoo_dir, model_name)
      if os.path.exists(model_dir):
          if use_cache:
              return
          else:
              shutil.rmtree(model_dir)
      os.makedirs(model_dir)
  
      for f in ["predict_net.pb", "init_net.pb", "value_info.json"]:
          url = getURLFromName(model_name, f)
          dest = os.path.join(model_dir, f)
          try:
              try:
                  downloadFromURLToFile(url, dest, show_progress=False)
              except TypeError:
                  # show_progress not supported prior to
                  # Caffe2 78c014e752a374d905ecfb465d44fa16e02a28f1
                  # (Sep 17, 2017)
                  downloadFromURLToFile(url, dest)
          except Exception as e:
              print(f"Abort: {e}")
              print("Cleaning up...")
              deleteDirectory(model_dir)
              raise
  
imports: import argparse
  import glob
  import json
  import os
  import shutil
  import tarfile
  import tempfile
  from urllib.request import urlretrieve
  import boto3
  import caffe2.python.onnx.backend
  import caffe2.python.onnx.frontend
  import caffe2.python.workspace
  import numpy
  import onnx
  import onnx.backend
  from caffe2.proto import caffe2_pb2
  from caffe2.python.models.download import deleteDirectory, downloadFromURLToFile, getURLFromName
  from onnx import numpy_helper
label_desc: Use image node_id 3 for calling a global function with example usage: download_caffe2_model(model_name, zoo_dir, use_cache) without return types