code: def dendrogram_coords(leaf_positions, partition_tree):
      """Returns the x and y coords of the lines of a dendrogram where the leaf order is given.
  
      Note that scipy can compute these coords as well, but it does not allow you to easily specify
      a specific leaf order, hence this reimplementation.
      """
  
      xout = []
      yout = []
      _dendrogram_coords_rec(
          partition_tree.shape[0] - 1,
          leaf_positions,
          partition_tree,
          xout,
          yout,
      )
  
      return np.array(xout), np.array(yout)
  
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 5 for calling a global function with example usage: dendrogram_coords(leaf_positions, partition_tree) and returns: np,  np