code: def shadow_dec_tree(dec_tree_pipeline, dataset) -> ShadowSKDTree:
      features = [
          "Pclass",
          "Age",
          "Fare",
          "Sex_label",
          "Cabin_label",
          "Embarked_label",
      ]
      target = "Survived"
  
      tree_model, X_train, feature_names = extract_params_from_pipeline(
          pipeline=dec_tree_pipeline,
          X_train=dataset[features],
          feature_names=features,
      )
  
      return ShadowSKDTree(
          tree_model=tree_model,
          X_train=X_train,
          y_train=dataset[target],
          feature_names=feature_names,
          class_names=list(dec_tree_pipeline.classes_),
      )
  
file_path: dtreeviz/testing/testlib/models/test_decision_trees_sk_pipeline.py
imports: import numpy
  import pytest
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.feature_selection import VarianceThreshold
  from sklearn.pipeline import make_pipeline, Pipeline
  from sklearn.preprocessing import PolynomialFeatures
  from dtreeviz.models.sklearn_decision_trees import ShadowSKDTree
  from dtreeviz.utils import _extract_final_feature_names, extract_params_from_pipeline
label_desc: Use image node_id 2 for calling a global function with example usage: shadow_dec_tree(dec_tree_pipeline, dataset) and returns: ShadowSKDTree