code: def _do_retrieve(url, fname):
          
          folder = os.path.dirname(fname)
          if not os.path.exists(folder):
              os.makedirs(folder)
              print("{}/ created.".format(folder))
          if not os.path.exists(fname):
              with open(fname, 'wb') as fout:
                  print("retrieving {}.".format(url))
                  resp = urlopen(url)
                  fout.write(resp.read())
              print("{} saved.".format(fname))
          else:
              print("re-using artifact {}".format(fname))
          return fname
docs: Retrieve given url to target filepath fname.