code: def test_model_parts(self):
      mai = self.aspect.model_parts()
      groups = {
          "personal_info": ["gender", "age"],
          "ticket_info": ["class", "embarked", "fare"],
          "other": ["sibsp", "parch"],
      }
      mai2 = self.aspect2.model_parts(variable_groups=groups)
      mai3 = self.aspect.model_parts(type="ratio")
      mai4 = self.aspect2.model_parts(type="difference")
      mai5 = self.aspect.model_parts(loss_function="rmse")
  
      self.assertEqual(mai.loss_function, loss_one_minus_auc)
      self.assertEqual(mai2.loss_function, loss_one_minus_auc)
      self.assertEqual(mai3.loss_function, loss_one_minus_auc)
      self.assertEqual(mai4.loss_function, loss_one_minus_auc)
      self.assertEqual(mai5.loss_function, loss_root_mean_square)
  
      for mai_x in [mai, mai2, mai3, mai4, mai5]:
          self.assertIsInstance(mai_x, dx.aspect.ModelAspectImportance)
          self.assertIsInstance(mai_x.result, pd.DataFrame)
          self.assertEqual(
              set(mai_x.result.columns),
              set(
                  [
                      "aspect_name",
                      "variable_names",
                      "dropout_loss",
                      "dropout_loss_change",
                      "label",
                      "min_depend",
                      "vars_min_depend",
                  ]
              ),
          )
          self.assertGreaterEqual(1, mai_x.result.min_depend.max())
          self.assertGreaterEqual(mai_x.result.min_depend.min(), 0)
          for index, row in mai_x.result.iterrows():
              if row["aspect_name"] not in [
                  "_baseline_",
                  "_full_model_",
              ]:
                  self.assertTrue(
                      set(row["vars_min_depend"]).issubset(
                          set(row["variable_names"])
                      )
                  )
          fig = mai_x.plot(show=False)
          self.assertIsInstance(fig, Figure)
          fig2 = mai_x.plot(
              show=False, bar_width=18, vertical_spacing=0.12
          )
          self.assertIsInstance(fig2, Figure)
          fig3 = mai_x.plot(
              show=False,
              show_variable_names=False,
              bar_width=18,
              title="Testing",
              vertical_spacing=0.12,
          )
          self.assertIsInstance(fig3, Figure)
          fig4 = mai_x.plot(
              show=False,
              max_aspects=4,
              show_variable_names=False,
              bar_width=18,
              title="Testing",
              vertical_spacing=0.12,
          )
          self.assertIsInstance(fig4, Figure)
  
imports: import unittest
  import numpy
  import pandas
  from plotly.graph_objs import Figure
  from ipywidgets.widgets.widget_box import HBox
  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
  from sklearn.ensemble import RandomForestRegressor
  from traitlets.traitlets import Dict
  import dalex
  from dalex.model_explanations._variable_importance.loss_functions import *
  from dalex.aspect._predict_aspect_importance.object import PredictAspectImportance
  from dalex.aspect._model_triplot.object import ModelTriplot
  from dalex.aspect._predict_triplot.object import PredictTriplot
  from dalex.aspect._model_aspect_importance.object import ModelAspectImportance
label_desc: Use image node_id 5 for calling the AspectTestTitanic obj's underlying member method code with example usage: obj.test_model_parts() without return types