def get_avg_cluster_score(distances, left, right):
    """
    Computes the score average for the cluster, formed by the vectors with indices between "left" and "right"
    """
    if left == right:
        return distances[left][right]

    score = 0
    count = 0
    for i in range(left, right):
        for j in range(i+1, right+1):
            score += distances[i][j]
            count += 1

    return score / count