code: def download_examples(path):
      import gzip
      import urllib.request
  
      baseurl = "http://yann.lecun.com/exdb/mnist/"
      for elem in [
          "train-images-idx3-ubyte.gz",
          "train-labels-idx1-ubyte.gz",
          "t10k-images-idx3-ubyte.gz",
          "t10k-labels-idx1-ubyte.gz",
      ]:
          print("downloading " + elem + " ...")
          outfile = open(os.path.join(path, elem[:-3]), "wb")
          downloaded = urllib.request.urlopen(baseurl + elem)
          outfile.write(gzip.GzipFile(fileobj=downloaded).read())
  
file_path: dynet/examples/mnist/mnist-autobatch.py
imports: import time
  import random
  import os
  import struct
  import argparse
  import numpy
  import dynet
label_desc: Use image node_id 2 for calling a global function with example usage: download_examples(path) without return types