code: def _get_leaves_color_list(R):
      leaves_color_list = [None] * len(R["leaves"])
      for link_x, link_y, link_color in zip(
          R["icoord"], R["dcoord"], R["color_list"]
      ):
          for xi, yi in zip(link_x, link_y):
              if yi == 0.0:  # if yi is 0.0, the point is a leaf
                  # xi of leaves are      5, 15, 25, 35, ... (see `iv_ticks`)
                  # index of leaves are   0,  1,  2,  3, ... as below
                  leaf_index = (int(xi) - 5) // 10
                  # each leaf has a same color of its link.
                  leaves_color_list[leaf_index] = link_color
      return leaves_color_list
  
imports: import warnings
  import bisect
  from collections import deque
  import numpy
  from .None import _hierarchy, _optimal_leaf_ordering
  import scipy.spatial.distance
  from scipy._lib._disjoint_set import DisjointSet
label_desc: Use image node_id 40 for calling a global function with example usage: _get_leaves_color_list(R) and returns: leaves_color_list