import operator


def assign_by_max(pre_scores, post_scores):
    """
    Make a single edge assignment by the maximum score:

    Returns a list with a single tuple fitting the interface
      (presyn_segid, postsyn_segid, presyn_score, postsyn_score)
    """
    pre_seg, pre_score = max(pre_scores.items(), key=operator.itemgetter(1))
    post_seg, post_score = max(post_scores.items(), key=operator.itemgetter(1))

    return [(pre_seg, post_seg, pre_score, post_score)]