code: def _add_points_on_dendrogram_traces(fig):
      # add points to all traces in dendrogram
      k = len(fig.data)
      # get global range of axis
      range_x = fig.full_figure_for_development(
          warn=False
      ).layout.xaxis.range
      range_x_len = range_x[1] - range_x[0]
      range_y = fig.full_figure_for_development(
          warn=False
      ).layout.yaxis.range
      range_y_len = range_y[1] - range_y[0]
      for i in range(k):
          arr_text = fig.data[i]["text"]
          inserted_points = 0
          (
              fig.data[i]["x"],
              fig.data[i]["y"],
              j,
              arr_text,
          ) = _add_between_points(
              fig.data[i]["x"],
              fig.data[i]["y"],
              fig.data[i]["y"][inserted_points],
              range_x_len,
              inserted_points,
              inserted_points + 1,
              arr_text,
          )
          inserted_points += j + 1
          (
              fig.data[i]["y"],
              fig.data[i]["x"],
              j,
              arr_text,
          ) = _add_between_points(
              fig.data[i]["y"],
              fig.data[i]["x"],
              fig.data[i]["x"][inserted_points],
              range_y_len,
              inserted_points,
              inserted_points + 1,
              arr_text,
          )
          inserted_points += j + 1
          (
              fig.data[i]["y"],
              fig.data[i]["x"],
              j,
              arr_text,
          ) = _add_between_points(
              fig.data[i]["y"],
              fig.data[i]["x"],
              fig.data[i]["x"][inserted_points],
              range_y_len,
              inserted_points,
              inserted_points + 1,
              arr_text,
          )
          inserted_points += j + 1
          (
              fig.data[i]["x"],
              fig.data[i]["y"],
              j,
              arr_text,
          ) = _add_between_points(
              fig.data[i]["x"],
              fig.data[i]["y"],
              fig.data[i]["y"][inserted_points],
              range_x_len,
              inserted_points,
              inserted_points + 1,
              arr_text,
          )
          inserted_points += j + 1
          if arr_text is not None:
              fig.data[i]["text"] = arr_text
      return fig
  
imports: import numpy
  from plotly.figure_factory import create_dendrogram
  import plotly.graph_objects
label_desc: Use image node_id 4 for calling a global function with example usage: _add_points_on_dendrogram_traces(fig) and returns: fig