As part of a Forsta analytics coding exercise, classify a five-card hand based only on its card ranks. Write a function that determines whether the hand is a full house, meaning one rank appears exactly three times and a different rank appears exactly twice.
The order of the cards does not matter, and suits are not provided because they do not affect this classification.
Implement is_full_house(ranks), where ranks is a list of exactly five integers. Return True if the rank frequencies are {3, 2} for two distinct ranks. Return False for every other frequency pattern.
def is_full_house(ranks):