code: def load_mnist(
      raw: bool = False,
  ) -> DATASET_TYPE:
      """
      Loads MNIST dataset from `config.ART_DATA_PATH` or downloads it if necessary.
  
      :param raw: `True` if no preprocessing should be applied to the data. Otherwise, data is normalized to 1.
      :return: `(x_train, y_train), (x_test, y_test), min, max`.
      """
      path = get_file(
          "mnist.npz",
          path=config.ART_DATA_PATH,
          url="https://s3.amazonaws.com/img-datasets/mnist.npz",
      )
  
      dict_mnist = np.load(path)
      x_train = dict_mnist["x_train"]
      y_train = dict_mnist["y_train"]
      x_test = dict_mnist["x_test"]
      y_test = dict_mnist["y_test"]
      dict_mnist.close()
  
      # Add channel axis
      min_, max_ = 0.0, 255.0
      if not raw:
          min_, max_ = 0.0, 1.0
          x_train = np.expand_dims(x_train, axis=3)
          x_test = np.expand_dims(x_test, axis=3)
          x_train, y_train = preprocess(x_train, y_train)
          x_test, y_test = preprocess(x_test, y_test)
  
      return (x_train, y_train), (x_test, y_test), min_, max_
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import math
  import os
  import shutil
  import sys
  import tarfile
  import warnings
  import zipfile
  from functools import wraps
  from inspect import signature
  from typing import TYPE_CHECKING, Callable, List, Dict, Optional, Tuple, Union
  import numpy
  import six
  from scipy.special import gammainc
  from tqdm.auto import tqdm
  from art import config
label_desc: Use image node_id 29 for calling a global function with example usage: load_mnist(raw) and returns: x_train,  y_train,  x_test,  y_test,  min_,  max_