code: def _add_points_on_dendrogram_traces(fig):
      k = len(fig.data)
      range_x2 = fig.full_figure_for_development(
          warn=False
      ).layout.xaxis2.range
      range_x2_len = range_x2[1] - range_x2[0]
      range_x3 = fig.full_figure_for_development(
          warn=False
      ).layout.xaxis3.range
      range_x3_len = range_x3[1] - range_x3[0]
      range_y = fig.full_figure_for_development(
          warn=False
      ).layout.yaxis.range
      range_y_len = range_y[1] - range_y[0]
      middle_point = [None] * k
      for i in range(1, k):
          if i < ((k - 1) / 2 + 1):
              range_x_len = range_x2_len
          else:
              range_x_len = range_x3_len
          arr_text = None
          num_points = len(fig.data[i]["x"])
          if num_points == 5:
              arr_text = fig.data[i]["text"]
          middle_point[i] = fig.data[i]["x"][2], fig.data[i]["y"][2]
  
          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
  
          if num_points == 5:
              (
                  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, middle_point
  
file_path: DALEX/python/dalex/dalex/aspect/_model_triplot/plot.py
imports: import numpy
  import plotly.graph_objects
  from copy import deepcopy
  from dalex import _theme, _global_utils
label_desc: Use image node_id 8 for calling a global function with example usage: _add_points_on_dendrogram_traces(fig) and returns: fig,  middle_point