code: def get_df_coord(den):
      """
      Get coordinate dataframe.
      """
      # if you view the dendrogram as a collection of upside-down "U" shapes, then
      # we can regard the 4 corners of the upside-down "U" as points 1, 2, 3 and 4.
      cols_xk = ["xk1", "xk2", "xk3", "xk4"]
      cols_yk = ["yk1", "yk2", "yk3", "yk4"]
  
      df_coord = pd.merge(
          pd.DataFrame(den["icoord"], columns=cols_xk),
          pd.DataFrame(den["dcoord"], columns=cols_yk),
          left_index=True,
          right_index=True,
      )
      return df_coord
  
imports: import pandas
  import altair
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: get_df_coord(den) and returns: df_coord