code: def test_explain_titanic_val(model):
      # add multi-class
      # add regression
      titanic = load_titanic()
      titanic_clean = clean(titanic)
      X, y = (
          titanic_clean.drop("survived", axis=1),
          titanic_clean.survived,
      )
      X_train, X_val, y_train, y_val = train_test_split(
          X, y, stratify=y, random_state=42
      )
      pipe = make_pipeline(EasyPreprocessor(), model)
      pipe.fit(X_train, y_train)
      # without validation set
      explain(pipe, feature_names=X.columns)
      # with validation set
      explain(pipe, X_val, y_val, feature_names=X.columns)
  
file_path: dabl/dabl/tests/test_explain.py
imports: import pytest
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.pipeline import make_pipeline
  from sklearn.linear_model import LogisticRegression
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.model_selection import train_test_split
  from dabl.datasets import load_titanic
  from dabl import SimpleClassifier, EasyPreprocessor, explain, clean
label_desc: Use image node_id 2 for calling a global function with example usage: test_explain_titanic_val(model) without return types