code: def load_mnist(n_samples=None, class_0="0", class_1="8"):
      """Load MNIST, select two classes, shuffle and return only n_samples."""
      # Load data from http://openml.org/d/554
      mnist = fetch_openml("mnist_784", version=1, as_frame=False)
  
      # take only two classes for binary classification
      mask = np.logical_or(
          mnist.target == class_0, mnist.target == class_1
      )
  
      X, y = shuffle(
          mnist.data[mask], mnist.target[mask], random_state=42
      )
      if n_samples is not None:
          X, y = X[:n_samples], y[:n_samples]
      return X, y
  
file_path: scikit-learn/examples/linear_model/plot_sgd_early_stopping.py
imports: import sys
  import time
  import matplotlib.pyplot
  import numpy
  import pandas
  from sklearn import linear_model
  from sklearn.datasets import fetch_openml
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.model_selection import train_test_split
  from sklearn.utils import shuffle
  from sklearn.utils._testing import ignore_warnings
label_desc: Use image node_id 1 for calling a global function with example usage: load_mnist(n_samples, class_0, class_1) and returns: X,  y