def get_matching_card(card_list, card_to_match):
    """ This function returns the card that matches the one passed in """
    the_matching_card = None
    for test_card in card_list:
        if test_card.value == card_to_match.value and test_card != card_to_match:
            the_matching_card = test_card
            break
    return the_matching_card