code: def _download(self, model):
      model_dir = self._caffe2_model_dir(model)
      assert not os.path.exists(model_dir)
      os.makedirs(model_dir)
      for f in ["predict_net.pb", "init_net.pb", "value_info.json"]:
          url = getURLFromName(model, 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)
              sys.exit(1)
  
file_path: pytorch/scripts/model_zoo/update-caffe2-models.py
imports: import os
  import subprocess
  import sys
  import tarfile
  import tempfile
  from urllib.request import urlretrieve
  from caffe2.python.models.download import deleteDirectory, downloadFromURLToFile, getURLFromName
label_desc: Use image node_id 1 for calling the SomeClass obj's underlying member method code with example usage: obj._download(model) without return types