code: def imagenet50(display=False, resolution=224, n_points=None):
      """This is a set of 50 images representative of ImageNet images.
  
      This dataset was collected by randomly finding a working ImageNet link and then pasting the
      original ImageNet image into Google image search restricted to images licensed for reuse. A
      similar image (now with rights to reuse) was downloaded as a rough replacement for the original
      ImageNet image. The point is to have a random sample of ImageNet for use as a background
      distribution for explaining models trained on ImageNet data.
  
      Note that because the images are only rough replacements the labels might no longer be correct.
      """
  
      prefix = github_data_url + "imagenet50_"
      X = np.load(
          cache(f"{prefix}{resolution}x{resolution}.npy")
      ).astype(np.float32)
      y = np.loadtxt(cache(f"{prefix}labels.csv"))
  
      if n_points is not None:
          X = shap.utils.sample(X, n_points, random_state=0)
          y = shap.utils.sample(y, n_points, random_state=0)
  
      return X, y
  
file_path: shap/shap/datasets.py
imports: import os
  from urllib.request import urlretrieve
  import numpy
  import pandas
  import sklearn.datasets
  import shap
label_desc: Use image node_id 1 for calling a global function with example usage: imagenet50(display, resolution, n_points) and returns: X,  y