code: def get_mnist_dataset(load_mnist_dataset, mnist_shape):
      (x_train_mnist, y_train_mnist), (
          x_test_mnist,
          y_test_mnist,
      ) = load_mnist_dataset
  
      x_train_mnist = np.reshape(
          x_train_mnist, (x_train_mnist.shape[0],) + mnist_shape
      ).astype(np.float32)
      x_test_mnist = np.reshape(
          x_test_mnist, (x_test_mnist.shape[0],) + mnist_shape
      ).astype(np.float32)
  
      x_train_mnist_original = x_train_mnist.copy()
      y_train_mnist_original = y_train_mnist.copy()
      x_test_mnist_original = x_test_mnist.copy()
      y_test_mnist_original = y_test_mnist.copy()
  
      yield (x_train_mnist, y_train_mnist), (x_test_mnist, y_test_mnist)
  
      # Check that the test data has not been modified, only catches changes in attack.generate if self has been used
      np.testing.assert_array_almost_equal(
          x_train_mnist_original, x_train_mnist, decimal=3
      )
      np.testing.assert_array_almost_equal(
          y_train_mnist_original, y_train_mnist, decimal=3
      )
      np.testing.assert_array_almost_equal(
          x_test_mnist_original, x_test_mnist, decimal=3
      )
      np.testing.assert_array_almost_equal(
          y_test_mnist_original, y_test_mnist, decimal=3
      )
  
imports: import importlib
  import json
  import logging
  import os
  import shutil
  import tempfile
  from typing import Dict, List, TYPE_CHECKING, Union
  import warnings
  import numpy
  import pytest
  import requests
  from art.data_generators import KerasDataGenerator, MXDataGenerator, PyTorchDataGenerator, TensorFlowDataGenerator, TensorFlowV2DataGenerator
  from art.defences.preprocessor import FeatureSqueezing, JpegCompression, SpatialSmoothing
  from art.estimators.classification import KerasClassifier
  from tests.utils import ARTTestFixtureNotImplemented, get_attack_classifier_pt, get_image_classifier_kr, get_image_classifier_kr_functional, get_image_classifier_kr_tf, get_image_classifier_kr_tf_functional, get_image_classifier_kr_tf_with_wildcard, get_image_classifier_mxnet_custom_ini, get_image_classifier_pt, get_image_classifier_pt_functional, get_image_classifier_tf, get_image_classifier_hf, get_image_gan_tf_v2, get_image_generator_tf_v2, get_tabular_classifier_kr, get_tabular_classifier_pt, get_tabular_classifier_scikit_list, get_tabular_classifier_tf, load_dataset, master_seed
label_desc: Use image node_id 37 for calling a global function with example usage: get_mnist_dataset(load_mnist_dataset, mnist_shape) without return types