code: def extract_thresholds_from_dtree(
      dtree: Union[DecisionTreeClassifier, DecisionTreeRegressor],
      length_df: int,
  ) -> List[np.array]:
      """A helper function that extracts the decision threshold of a decision tree
  
      Args:
          dtree: A decisiontree model object
          length_df (int): length of the target dataframe
  
      Returns:
          a list of numpy array indicating the thersholds for each feature
      """
  
      tree_threshold = dtree.tree_.threshold
      tree_feature = dtree.tree_.feature
  
      # store decision thresholds of all features in a list
      thresholds_for_features = []
  
      for feat in range(length_df):
          if feat not in tree_feature:
              thresholds_for_features.append(np.array([]))
          else:
              thresholds_for_features.append(
                  np.unique(tree_threshold[tree_feature == feat])
              )
      return thresholds_for_features
  
label_desc: Use image node_id 1 for calling a global function with example usage: extract_thresholds_from_dtree(dtree, length_df) and returns: thresholds_for_features