def get_sorted(file):
    """ Sorts the kissing loop pairs in a file

    args:
        file -- str: path to the file with the kissing loops
    returns:
        list<tuple<str, str, float>> -- sorted list of the kissing loop pairs based on their energies
    """
    file.seek(0)
    pairs = []
    for l in file:
        print(l)
        t = l.strip().split(" ")
        pairs.append(((t[:2]), float(t[2])))
    return sorted(pairs, key = lambda x: x[1])