code: def get_class_weights(self):
      if self.is_classifier():
          unique_target_values = np.unique(self.y_train)
          return compute_class_weight(
              self.tree_model.class_weight,
              classes=unique_target_values,
              y=self.y_train,
          )
  
imports: from collections import defaultdict
  from typing import List, Mapping
  import numpy
  from sklearn.utils import compute_class_weight
  from dtreeviz.models.shadow_decision_tree import ShadowDecTree
  from dtreeviz.utils import criterion_remapping
label_desc: Use image node_id 4 for calling the ShadowSKDTree obj's underlying member method code with example usage: obj.get_class_weights() and returns: compute_class_weight