code: def test_shap(self):
      self.assertIsInstance(
          self.exp.predict_parts(self.X.iloc[[0]], type="shap"),
          dx.predict_explanations.Shap,
      )
      self.assertIsInstance(
          self.exp.predict_parts(self.X.iloc[0], type="shap"),
          dx.predict_explanations.Shap,
      )
      self.assertIsInstance(
          self.exp.predict_parts(self.X.iloc[0].values, type="shap"),
          dx.predict_explanations.Shap,
      )
      self.assertIsInstance(
          self.exp.predict_parts(self.X.iloc[[0]].values, type="shap"),
          dx.predict_explanations.Shap,
      )
      self.assertIsInstance(
          self.exp.predict_parts(
              self.X.iloc[[0]].values, type="shap", processes=2
          ),
          dx.predict_explanations.Shap,
      )
  
      with self.assertRaises(ValueError):
          self.exp.predict_parts(self.X.iloc[:2], type="shap")
  
      with self.assertRaises(ValueError):
          self.exp.predict_parts(self.X.iloc[:2].values, type="shap")
  
      self.assertIsInstance(
          self.exp.predict_parts(
              self.X.iloc[[0]].values,
              type="shap",
              order=[
                  "age",
                  "gender",
                  "sibsp",
                  "fare",
                  "parch",
                  "class",
                  "embarked",
              ],
          ),
          dx.predict_explanations.Shap,
      )
  
      self.assertIsInstance(
          self.exp.predict_parts(
              self.X.iloc[[0]], type="shap", path=[3, 0, 1, 2, 4, 5, 6]
          ),
          dx.predict_explanations.Shap,
      )
  
      with self.assertRaises(TypeError):
          self.exp.predict_parts(
              self.X.iloc[[0]],
              type="shap",
              path=[
                  "gender",
                  "embarked",
                  "sibsp",
                  "fare",
                  "age",
                  "parch",
                  "class",
              ],
          )
  
      tmp = self.exp.predict_parts(
          self.X.iloc[[0]].values,
          type="shap",
          path=[3, 0, 1, 2, 4, 5, 6],
      ).result
      self.assertTrue(
          (
              tmp.loc[tmp.B == 0, "variable_name"].values
              == [
                  "embarked",
                  "gender",
                  "age",
                  "class",
                  "fare",
                  "sibsp",
                  "parch",
              ]
          ).all()
      )
  
      _row_count = self.exp.data.shape[0]
      self.assertIsInstance(
          self.exp.predict_parts(self.X.iloc[[0]], type="shap", B=1),
          dx.predict_explanations.Shap,
      )
      self.assertEqual(_row_count, self.exp.data.shape[0])
      _row_count = self.exp.data.shape[0]
      self.assertIsInstance(
          self.exp.predict_parts(self.X.iloc[[0]], type="shap", N=100),
          dx.predict_explanations.Shap,
      )
      self.assertEqual(_row_count, self.exp.data.shape[0])
  
      self.assertTrue(
          hasattr(
              self.exp.predict_parts(
                  self.X.iloc[[0]], type="shap", keep_distributions=True
              ),
              "yhats_distributions",
          )
      )
  
      self.assertIsInstance(
          self.exp.predict_parts(
              self.X.iloc[[0]], type="shap", keep_distributions=True
          ).yhats_distributions,
          pd.DataFrame,
      )
  
      # notify
      self.assertIsInstance(
          self.exp.predict_parts(
              self.X.iloc[[0]], type="shap", interaction_preference=2
          ),
          dx.predict_explanations.Shap,
      )
  
      # notify?
      self.assertIsInstance(
          self.exp.predict_parts(
              self.X.iloc[[0]], type="shap", interaction_preference=0.5
          ),
          dx.predict_explanations.Shap,
      )
  
file_path: DALEX/python/dalex/test/test_predict_parts.py
imports: import unittest
  import pandas
  import numpy
  from sklearn.compose import ColumnTransformer
  from sklearn.impute import SimpleImputer
  from sklearn.neural_network import MLPClassifier
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import StandardScaler, LabelEncoder, OneHotEncoder
  import dalex
  from plotly.graph_objs import Figure
label_desc: Use image node_id 4 for calling the PredictPartsTestTitanic obj's underlying member method code with example usage: obj.test_shap() without return types