code: def test_bd(self):
      self.assertIsInstance(
          self.exp.predict_parts(self.X.iloc[[0]], type="break_down"),
          dx.predict_explanations.BreakDown,
      )
      self.assertIsInstance(
          self.exp.predict_parts(self.X.iloc[0], type="break_down"),
          dx.predict_explanations.BreakDown,
      )
      self.assertIsInstance(
          self.exp.predict_parts(
              self.X.iloc[0].values, type="break_down"
          ),
          dx.predict_explanations.BreakDown,
      )
      self.assertIsInstance(
          self.exp.predict_parts(
              self.X.iloc[[0]].values, type="break_down"
          ),
          dx.predict_explanations.BreakDown,
      )
  
      with self.assertRaises(ValueError):
          self.exp.predict_parts(self.X.iloc[:2], type="break_down")
  
      with self.assertRaises(ValueError):
          self.exp.predict_parts(
              self.X.iloc[:2].values, type="break_down"
          )
  
      self.assertTrue(
          (
              self.exp.predict_parts(
                  self.X.iloc[[0]].values,
                  type="break_down",
                  order=[
                      "age",
                      "gender",
                      "sibsp",
                      "fare",
                      "parch",
                      "class",
                      "embarked",
                  ],
              ).result.variable_name.values
              == [
                  "intercept",
                  "age",
                  "gender",
                  "sibsp",
                  "fare",
                  "parch",
                  "class",
                  "embarked",
                  "",
              ]
          ).all()
      )
  
      self.assertTrue(
          (
              self.exp.predict_parts(
                  self.X.iloc[[0]].values,
                  type="break_down",
                  order=[
                      "gender",
                      "embarked",
                      "sibsp",
                      "fare",
                      "age",
                      "parch",
                      "class",
                  ],
              ).result.variable_name.values
              == [
                  "intercept",
                  "gender",
                  "embarked",
                  "sibsp",
                  "fare",
                  "age",
                  "parch",
                  "class",
                  "",
              ]
          ).all()
      )
  
      self.assertTrue(
          (
              self.exp.predict_parts(
                  self.X.iloc[[0]].values,
                  type="break_down",
                  order=[3, 2, 1, 0, 4, 5, 6],
              ).result.variable_name.values
              == [
                  "intercept",
                  "embarked",
                  "class",
                  "age",
                  "gender",
                  "fare",
                  "sibsp",
                  "parch",
                  "",
              ]
          ).all()
      )
  
      self.assertTrue(
          (
              self.exp.predict_parts(
                  self.X.iloc[[0]].values,
                  type="break_down",
                  order=[3, 0, 1, 2, 4, 5, 6],
              ).result.variable_name.values
              == [
                  "intercept",
                  "embarked",
                  "gender",
                  "age",
                  "class",
                  "fare",
                  "sibsp",
                  "parch",
                  "",
              ]
          ).all()
      )
  
      self.assertIsInstance(
          self.exp.predict_parts(
              self.X.iloc[[0]],
              type="break_down",
              path=[3, 0, 1, 2, 4, 5, 6],
          ),
          dx.predict_explanations.BreakDown,
      )
  
      _row_count = self.exp.data.shape[0]
      self.assertIsInstance(
          self.exp.predict_parts(
              self.X.iloc[[0]], type="break_down", B=1
          ),
          dx.predict_explanations.BreakDown,
      )
      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="break_down", N=100
          ),
          dx.predict_explanations.BreakDown,
      )
      self.assertEqual(_row_count, self.exp.data.shape[0])
  
      self.assertTrue(
          hasattr(
              self.exp.predict_parts(
                  self.X.iloc[[0]],
                  type="break_down",
                  keep_distributions=True,
              ),
              "yhats_distributions",
          )
      )
  
      self.assertIsInstance(
          self.exp.predict_parts(
              self.X.iloc[[0]],
              type="break_down",
              keep_distributions=True,
          ).yhats_distributions,
          pd.DataFrame,
      )
  
      # notify?
      self.assertIsInstance(
          self.exp.predict_parts(
              self.X.iloc[[0]],
              type="break_down",
              interaction_preference=2,
          ),
          dx.predict_explanations.BreakDown,
      )
  
      # notify?
      self.assertIsInstance(
          self.exp.predict_parts(
              self.X.iloc[[0]],
              type="break_down",
              interaction_preference=0.5,
          ),
          dx.predict_explanations.BreakDown,
      )
  
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 2 for calling the PredictPartsTestTitanic obj's underlying member method code with example usage: obj.test_bd() without return types