def most_frequent_frame(vector):
    """Determines the most frequent frame of all unitvector terms in a vector.
    """
    frame_counter = {}
    for uv in vector.dict:
        frame_counter[uv.frame] = frame_counter.get(uv.frame, 0) + 1
    return max([(frame_counter[x], x) for x in frame_counter])[1]