human
Complete this python program:
def get_mnist():
assistant
#Here is the Python code you requested.

    """Download and load the MNIST dataset
    Returns
    dict
    A dict containing the data
    """
    def read_data(label_url, image_url):
        with gzip.open(mx.test_utils.download(label_url)) as flbl:
            struct.unpack('>II', flbl.read(8))
            label = np.fromstring(flbl.read(), dtype=np.int8)
        with gzip.open(mx.test_utils.download(image_url), 'rb') as fimg:
            (_, _, rows, cols) = struct.unpack('>IIII', fimg.read(16))
            image = np.fromstring(fimg.read(), dtype=np.uint8).reshape(len(label), rows, cols)
            image = (image.reshape(image.shape[0], 1, 28, 28).astype(np.float32) / 255)
        return (label, image)
    path = 'http://data.mxnet.io/data/mnist/'
    (train_lbl, train_img) = read_data((path + 'train-labels-idx1-ubyte.gz'), (path + 'train-images-idx3-ubyte.gz'))
    (test_lbl, test_img) = read_data((path + 't10k-labels-idx1-ubyte.gz'), (path + 't10k-images-idx3-ubyte.gz'))
    return {'train_data': train_img, 'train_label': train_lbl, 'test_data': test_img, 'test_label': test_lbl}