def topic_tuple_overlap(topictups):
    """
    Return an overlap measure over 3 topic distributions

    :param topictups: a list of 3 tuples, each tuple contains word-probability information
    :return: overlap measure given by product of probabilities of words overlapping across all
        three tuples
    """
    topic_dicts = {}, {}, {}
    for i, topictup in enumerate(topictups):
        for tup in topictup:
            topic_dicts[i][tup[0]] = tup[1]
    overlap = 0.0
    for word in topic_dicts[0]:
        try:
            overlap += topic_dicts[0][word] * topic_dicts[1][word
                ] * topic_dicts[2][word]
        except KeyError:
            continue
    return overlap
