code: def download(url, download_dir):
      outname = os.path.join(download_dir, os.path.basename(url))
      if tf.gfile.Exists(outname):
          print("Found %s, skipping download" % outname)
          return outname
      inprogress = outname + ".incomplete"
      print("Downloading %s" % url)
      inprogress, _ = urllib.urlretrieve(url, inprogress)
      tf.gfile.Rename(inprogress, outname)
      return outname
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import contextlib
  import datetime
  import gzip
  import os
  import re
  import urllib
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling a global function with example usage: download(url, download_dir) and returns: outname, outname