'Calculates the average of function results for each coder pair'

def _pairwise_average(self, function):

    total = 0
    n = 0
    s = self.C.copy()
    for cA in self.C:
        s.remove(cA)
        for cB in s:
            total += function(cA, cB)
            n += 1
    ret = (total / n)
    return ret
