code: def spark_dtree(
      tree_model, dataset_spark_tensorflow
  ) -> ShadowSparkTree:
      features = [
          "Pclass",
          "Sex_label",
          "Embarked_label",
          "Age_mean",
          "SibSp",
          "Parch",
          "Fare",
      ]
      target = "Survived"
      return ShadowSparkTree(
          tree_model,
          dataset_spark_tensorflow[features],
          dataset_spark_tensorflow[target],
          features,
          target,
      )
  
imports: import numpy
  import pyspark
  import pytest
  from pyspark.ml.classification import DecisionTreeClassificationModel
  from pyspark.sql import SparkSession
  from dtreeviz.models.spark_decision_tree import ShadowSparkTree
label_desc: Use image node_id 2 for calling a global function with example usage: spark_dtree(tree_model, dataset_spark_tensorflow) and returns: ShadowSparkTree