def _timex_pairs(timexes):
    """Return a list of timex pairs where the first element occurs before the
    second element on the input list."""
    pairs = []
    for i in range(len(timexes)):
        for j in range(len(timexes)):
            if i < j:
                pairs.append([timexes[i], timexes[j]])
    return pairs