code: def test_constructor(self):
      case1 = self.exp.model_diagnostics()
      self.assertIsInstance(
          case1, (dx.model_explanations.ResidualDiagnostics,)
      )
      self.assertIsInstance(case1.result, (pd.DataFrame,))
      self.assertEqual(case1.result.shape[0], self.exp.data.shape[0])
      self.assertTrue(
          np.isin(
              [
                  "y",
                  "y_hat",
                  "residuals",
                  "abs_residuals",
                  "label",
                  "ids",
              ],
              case1.result.columns,
          ).all()
      )
  
      case2 = self.exp.model_diagnostics(variables=["age", "class"])
      self.assertIsInstance(
          case2, (dx.model_explanations.ResidualDiagnostics,)
      )
      self.assertIsInstance(case2.result, (pd.DataFrame,))
      self.assertEqual(case2.result.shape[0], self.exp.data.shape[0])
      self.assertTrue(
          np.isin(
              [
                  "y",
                  "y_hat",
                  "residuals",
                  "abs_residuals",
                  "label",
                  "ids",
                  "age",
                  "class",
              ],
              case2.result.columns,
          ).all()
      )
      self.assertFalse(
          np.isin(
              ["fare", "sibsp", "gender", "embarked"],
              case2.result.columns,
          ).any()
      )
  
file_path: DALEX/python/dalex/test/test_model_diagnostics.py
imports: import unittest
  import numpy
  import pandas
  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
  import time
label_desc: Use image node_id 2 for calling the ModelDiagnosticsTestTitanic obj's underlying member method code with example usage: obj.test_constructor() without return types