code: def get_fill_colors(cols, n_fill):
      """Get the fill colors for the middle of divergent colormaps."""
      steps = np.linalg.norm(
          np.diff(cols[:, :3].astype(float), axis=0), axis=1
      )
  
      ind = np.flatnonzero(steps[1:-1] > steps[[0, -1]].mean() * 3)
      if ind.size > 0:
          # choose the two colors between which there is the large step
          ind = ind[0] + 1
          fillcols = np.r_[
              np.tile(cols[ind, :], (n_fill // 2, 1)),
              np.tile(cols[ind + 1, :], (n_fill - n_fill // 2, 1)),
          ]
      else:
          # choose a color from the middle of the colormap
          fillcols = np.tile(
              cols[int(cols.shape[0] / 2), :], (n_fill, 1)
          )
  
      return fillcols
  
imports: import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: get_fill_colors(cols, n_fill) and returns: fillcols