code: def _dendrogram_coords_rec(
      pos, leaf_positions, partition_tree, xout, yout
  ):
      M = partition_tree.shape[0] + 1
  
      if pos < 0:
          return leaf_positions[pos + M], 0
  
      left = int(partition_tree[pos, 0]) - M
      right = int(partition_tree[pos, 1]) - M
  
      x_left, y_left = _dendrogram_coords_rec(
          left, leaf_positions, partition_tree, xout, yout
      )
      x_right, y_right = _dendrogram_coords_rec(
          right, leaf_positions, partition_tree, xout, yout
      )
  
      y_curr = partition_tree[pos, 2]
  
      xout.append([x_left, x_left, x_right, x_right])
      yout.append([y_left, y_curr, y_curr, y_right])
  
      return (x_left + x_right) / 2, y_curr
  
file_path: shap/shap/plots/_utils.py
imports: import matplotlib.pyplot
  import numpy
  from ..None import Explanation
  from ..utils import OpChain
  from .None import colors
label_desc: Use image node_id 6 for calling a global function with example usage: _dendrogram_coords_rec(pos, leaf_positions, partition_tree, xout, yout) and returns: unknown,  y_curr, leaf_positions,  int