code: def make_npz(path, urls):
      x_url, y_url = urls
      x_path = download.cached_download(x_url)
      y_path = download.cached_download(y_url)
  
      with gzip.open(x_path, "rb") as fx, gzip.open(y_path, "rb") as fy:
          fx.read(4)
          fy.read(4)
          (N,) = struct.unpack(">i", fx.read(4))
          if N != struct.unpack(">i", fy.read(4))[0]:
              raise RuntimeError(
                  "wrong pair of MNIST images and labels"
              )
          fx.read(8)
  
          x = numpy.empty((N, 784), dtype=numpy.uint8)
          y = numpy.empty(N, dtype=numpy.uint8)
  
          for i in six.moves.range(N):
              y[i] = ord(fy.read(1))
              for j in six.moves.range(784):
                  x[i, j] = ord(fx.read(1))
  
      numpy.savez_compressed(path, x=x, y=y)
      return {"x": x, "y": y}
  
file_path: chainer/chainer/datasets/_mnist_helper.py
imports: import gzip
  import struct
  import numpy
  import six
  from chainer.dataset import download
  from chainer.datasets import tuple_dataset
label_desc: Use image node_id 1 for calling a global function with example usage: make_npz(path, urls) and returns: dict