code: def __init__(
      self,
      booster: Booster,
      tree_index: int,
      X_train,
      y_train,
      feature_names: List[str] = None,
      target_name: str = None,
      class_names: (List[str], Mapping[int, str]) = None,
  ):
      if hasattr(booster, "get_booster"):
          booster = (
              booster.get_booster()
          )  # support XGBClassifier and XGBRegressor
      utils.check_tree_index(tree_index, len(booster.get_dump()))
      self.booster = booster
      self.tree_index = tree_index
      self.tree_to_dataframe = self._get_tree_dataframe()
      self.children_left = self._calculate_children(
          self.__class__.LEFT_CHILDREN_COLUMN
      )
      self.children_right = self._calculate_children(
          self.__class__.RIGHT_CHILDREN_COLUMN
      )
      self.config = json.loads(self.booster.save_config())
      self.node_to_samples = None  # lazy initialized
      self.features = None  # lazy initialized
  
      super().__init__(
          booster,
          X_train,
          y_train,
          feature_names,
          target_name,
          class_names,
      )
  
imports: import json
  import math
  from collections import defaultdict
  from typing import List, Mapping
  import numpy
  from dtreeviz.models.shadow_decision_tree import VisualisationNotYetSupportedError
  from dtreeviz.models.shadow_decision_tree import ShadowDecTree
  from dtreeviz import utils
  import xgboost
  from xgboost.core import Booster
label_desc: Use image node_id 1 to create a new ShadowXGBDTree object from inherited base classes: ShadowDecTree with example: obj = ShadowXGBDTree(booster, tree_index, X_train, y_train, feature_names, target_name, class_names)