code: def __init__(
      self,
      tree_model: (
          DecisionTreeClassificationModel,
          DecisionTreeRegressionModel,
      ),
      X_train,
      y_train,
      feature_names: List[str] = None,
      target_name: str = None,
      class_names: (List[str], Mapping[int, str]) = None,
  ):
      (
          self.tree_nodes,
          self.children_left,
          self.children_right,
      ) = self._get_nodes_info(tree_model)
      self.features = None  # lazy initialization
      self.thresholds = None  # lazy initialization
      self.node_to_samples = None  # lazy initialization
      super().__init__(
          tree_model,
          X_train,
          y_train,
          feature_names,
          target_name,
          class_names,
      )
  
imports: from abc import ABC
  from collections import defaultdict
  from typing import List, Mapping
  import numpy
  import pyspark
  from dtreeviz.models.shadow_decision_tree import ShadowDecTree
  from dtreeviz.utils import criterion_remapping
  from pyspark.ml.classification import DecisionTreeClassificationModel
  from pyspark.ml.regression import DecisionTreeRegressionModel
label_desc: Use image node_id 1 to create a new ShadowSparkTree object from inherited base classes: ShadowDecTree with example: obj = ShadowSparkTree(tree_model, X_train, y_train, feature_names, target_name, class_names)