def extract_pairs(conversations):
    """Extract pairs from the Cornell Movie Dialog Conversations."""
    collected_pairs = []
    for conversation in conversations:
        # if convo is ABC, pairs are AB and BC
        for i in range(len(conversation["lines"]) - 1):
            first_line = conversation["lines"][i]["text"].strip()
            second_line = conversation["lines"][i+1]["text"].strip()
            if first_line and second_line:
                collected_pairs.append([first_line, second_line])
    return collected_pairs