code: def blend_value(data, i, j, k, keys=None):
      """Computes the average value of the three vertices of a triangle in the
      simplex triangulation, where two of the vertices are on the lower
      horizontal."""
  
      key_size = len(list(data.keys())[0])
      if not keys:
          keys = triangle_coordinates(i, j, k)
      # Reduce key from (i, j, k) to (i, j) if necessary
      keys = [tuple(key[:key_size]) for key in keys]
  
      # Sum over the values of the points to blend
      try:
          s = sum(data[key] for key in keys)
          value = s / 3.0
      except KeyError:
          value = None
      return value
  
file_path: python-ternary/ternary/heatmapping.py
imports: import functools
  import numpy
  from matplotlib import pyplot
  from .helpers import unzip, normalize, simplex_iterator, permute_point, project_point
  from .colormapping import get_cmap, colormapper, colorbar_hack
label_desc: Use image node_id 1 for calling a global function with example usage: blend_value(data, i, j, k, keys) and returns: value