code: def _regr_split_viz(
      node: ShadowDecTreeNode,
      X_train: np.ndarray,
      y_train: np.ndarray,
      target_name: str,
      filename,
      y_range,
      ticks_fontsize,
      label_fontsize,
      fontname: str,
      X: np.array,
      highlight_node: bool,
      colors,
  ):
      colors = adjust_colors(colors)
  
      figsize = (2.5, 1.1)
      fig, ax = plt.subplots(1, 1, figsize=figsize)
  
      feature_name = node.feature_name()
      _format_axes(
          ax,
          feature_name,
          target_name if node == node.shadow_tree.root else None,
          colors,
          fontsize=label_fontsize,
          fontname=fontname,
          ticks_fontsize=ticks_fontsize,
          grid=False,
          pad_for_wedge=True,
      )
      ax.set_ylim(y_range)
  
      # Get X, y data for all samples associated with this node.
      X_feature = X_train[:, node.feature()]
      X_feature, y_train = (
          X_feature[node.samples()],
          y_train[node.samples()],
      )
  
      # only for str categorical features which are str type, int categorical features can work fine as numerical ones
      if node.is_categorical_split() and type(X_feature[0]) == str:
          # TODO think if the len() should be from all training[feature] data vs only data from this specific node ?
          overall_feature_range = (0, len(np.unique(X_feature)) - 1)
      else:
          overall_feature_range = (
              np.min(X_train[:, node.feature()]),
              np.max(X_train[:, node.feature()]),
          )
  
      ax.set_xlim(*overall_feature_range)
      xmin, xmax = overall_feature_range
  
      if not node.is_categorical_split():
          ax.scatter(
              X_feature,
              y_train,
              s=5,
              c=colors["scatter_marker"],
              alpha=colors["scatter_marker_alpha"],
              lw=0.3,
          )
          left, right = node.split_samples()
          left = y_train[left]
          right = y_train[right]
          split = node.split()
  
          ax.plot(
              [overall_feature_range[0], split],
              [np.mean(left), np.mean(left)],
              "--",
              color=colors["split_line"],
              linewidth=1,
          )
          ax.plot(
              [split, split],
              [*y_range],
              "--",
              color=colors["split_line"],
              linewidth=1,
          )
          ax.plot(
              [split, overall_feature_range[1]],
              [np.mean(right), np.mean(right)],
              "--",
              color=colors["split_line"],
              linewidth=1,
          )
  
          wedge_ticks = _draw_wedge(
              ax,
              x=node.split(),
              node=node,
              color=colors["wedge"],
              is_classifier=False,
          )
  
          if highlight_node:
              _ = _draw_wedge(
                  ax,
                  x=X[node.feature()],
                  node=node,
                  color=colors["highlight"],
                  is_classifier=False,
              )
  
          _set_wedge_ticks(
              ax,
              ax_ticks=list(overall_feature_range),
              wedge_ticks=wedge_ticks,
          )
  
      else:
          left_index, right_index = node.split_samples()
          tw = (xmax - xmin) * 0.018
  
          ax.set_xlim(
              overall_feature_range[0] - tw,
              overall_feature_range[1] + tw,
          )
          ax.scatter(
              X_feature[left_index],
              y_train[left_index],
              s=5,
              c=colors["categorical_split_left"],
              alpha=colors["scatter_marker_alpha"],
              lw=0.3,
          )
          ax.scatter(
              X_feature[right_index],
              y_train[right_index],
              s=5,
              c=colors["categorical_split_right"],
              alpha=colors["scatter_marker_alpha"],
              lw=0.3,
          )
  
          ax.plot(
              [xmin - tw, xmax + tw],
              [
                  np.mean(y_train[left_index]),
                  np.mean(y_train[left_index]),
              ],
              "--",
              color=colors["categorical_split_left"],
              linewidth=1,
          )
          ax.plot(
              [xmin - tw, xmax + tw],
              [
                  np.mean(y_train[right_index]),
                  np.mean(y_train[right_index]),
              ],
              "--",
              color=colors["categorical_split_right"],
              linewidth=1,
          )
  
          # no wedge ticks for categorical split, just the x_ticks in case the categorical value is not a string
          # if it's a string, then the xticks label will be handled automatically by ax.scatter plot
          if type(X_feature[0]) is not str:
              ax.set_xticks(
                  np.unique(
                      np.concatenate(
                          (X_feature, np.asarray(overall_feature_range))
                      )
                  )
              )
  
          if highlight_node:
              highlight_value = X[node.feature()]
              if type(X_feature[0]) is str:
                  plt.draw()
                  # get the label text and its position from the figure
                  label_index = dict(
                      [
                          (label.get_text(), label.get_position()[0])
                          for label in ax.get_xticklabels()
                      ]
                  )
                  highlight_value = label_index[X[node.feature()]]
              _ = _draw_wedge(
                  ax,
                  x=highlight_value,
                  node=node,
                  color=colors["highlight"],
                  is_classifier=False,
              )
  
      if filename is not None:
          plt.savefig(filename, bbox_inches="tight", pad_inches=0)
          plt.close()
  
imports: import os
  import tempfile
  from typing import Mapping, List, Callable
  import matplotlib
  import matplotlib.patches
  import matplotlib.pyplot
  import numpy
  import pandas
  from colour import Color, rgb2hex
  from sklearn import tree
  from dtreeviz.colors import adjust_colors
  from dtreeviz.interpretation import explain_prediction_plain_english, explain_prediction_sklearn_default
  from dtreeviz.models.shadow_decision_tree import ShadowDecTree
  from dtreeviz.models.shadow_decision_tree import ShadowDecTreeNode
  from dtreeviz.utils import myround, DTreeVizRender, add_classifier_legend, _format_axes, _draw_wedge, _set_wedge_ticks, tessellate, is_numeric
label_desc: Use image node_id 3 for calling a global function with example usage: _regr_split_viz(node, X_train, y_train, target_name, filename, y_range, ticks_fontsize, label_fontsize, fontname, X, highlight_node, colors) without return types