def calculate_hand_ranking(hand):
     if StraightFlushVerifier.verify_hand_ranking(hand):
         return StraightFlushCalculator.calculate_hand_ranking(hand)
     else:
         if FourOfAKindVerifier.verify_hand_ranking(hand):
             return FourOfAKindCalculator.calculate_hand_ranking(hand)
         else:
             if FullHouseVerifier.verify_hand_ranking(hand):
                 return FullHouseCalculator.calculate_hand_ranking(hand)
             else:
                 if FlushVerifier.verify_hand_ranking(hand):
                     return FlushCalculator.calculate_hand_ranking(hand)
                 else:
                     if StraightVerifier.verify_hand_ranking(hand):
                         return StraightCalculator.calculate_hand_ranking(hand)
                     else:
                         if ThreeOfAKindVerifier.verify_hand_ranking(hand):
                             return ThreeOfAKindCalculator.calculate_hand_ranking(hand)
                         else:
                             if TwoPairVerifier.verify_hand_ranking(hand):
                                 return TwoPairCalculator.calculate_hand_ranking(hand)
                             else:
                                 if OnePairVerifier.verify_hand_ranking(hand):
                                     return OnePairCalculator.calculate_hand_ranking(hand)
                                 else:
                                     if HighCardVerifier.verify_hand_ranking(hand):
                                         return HighCardCalculator.calculate_hand_ranking(hand)
                                     else:
                                         raise RuntimeError("unknown hand ranking")
 def calculate_hand_ranking(hand):
     if HighCardVerifier.verify_hand_ranking(hand):
         sorted_card_values = sorted([card.value for card in hand.cards], reverse=True)
         return HighCard(
             sorted_card_values[0],
             sorted_card_values[1],
             sorted_card_values[2],
             sorted_card_values[3],
             sorted_card_values[4]
         )
     else:
         raise RuntimeError("hand is not high card")