code: def get_max_split_index(tree):
      """Gets the max split index for the tree recursively.
  
      :param tree: The tree to get the max split index for.
      :type tree: dict
      """
      if SPLIT_INDEX in tree:
          max_index = tree[SPLIT_INDEX]
          index1 = get_max_split_index(tree[TreeSide.LEFT_CHILD])
          index2 = get_max_split_index(tree[TreeSide.RIGHT_CHILD])
          return max(max(max_index, index1), index2)
      else:
          return 0
  
imports: import logging
  import numbers
  from enum import Enum
  import numpy
  import pandas
  from lightgbm import Booster, LGBMClassifier, LGBMRegressor
  from sklearn.metrics import mean_absolute_error, mean_squared_error, median_absolute_error, r2_score
  from erroranalysis._internal.cohort_filter import filter_from_cohort
  from erroranalysis._internal.constants import DIFF, LEAF_INDEX, METHOD, PRED_Y, ROW_INDEX, SPLIT_FEATURE, SPLIT_INDEX, TRUE_Y, CohortFilterMethods, Metrics, ModelTask, TreeNode, error_metrics, f1_metrics, metric_to_display_name, precision_metrics, recall_metrics, regression_metrics
  from erroranalysis._internal.metrics import get_ordered_classes, metric_to_func
  from erroranalysis._internal.process_categoricals import process_categoricals
  from erroranalysis._internal.utils import is_spark
  from raiutils.exceptions import UserConfigValidationException
label_desc: Use image node_id 9 for calling a global function with example usage: get_max_split_index(tree) and returns: max, int