code: def communitiesandcrime(display=False, n_points=None):
      """Predict total number of non-violent crimes per 100K popuation.
  
      This dataset is from the classic UCI Machine Learning repository:
      https://archive.ics.uci.edu/ml/datasets/Communities+and+Crime+Unnormalized
      """
  
      raw_data = pd.read_csv(
          cache(github_data_url + "CommViolPredUnnormalizedData.txt"),
          na_values="?",
      )
  
      # find the indices where the total violent crimes are known
      valid_inds = np.where(np.invert(np.isnan(raw_data.iloc[:, -2])))[
          0
      ]
  
      if n_points is not None:
          valid_inds = shap.utils.sample(
              valid_inds, n_points, random_state=0
          )
  
      y = np.array(raw_data.iloc[valid_inds, -2], dtype=float)
  
      # extract the predictive features and remove columns with missing values
      X = raw_data.iloc[valid_inds, 5:-18]
      valid_cols = np.where(np.isnan(X.values).sum(0) == 0)[0]
      X = X.iloc[:, valid_cols]
  
      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 5 for calling a global function with example usage: communitiesandcrime(display, n_points) and returns: X,  y