human
I wrote the below code

    def matches(card_number, lengths, prefixes):
        if (len(card_number) not in lengths):
            return False
        for prefix in prefixes:
            if card_number.startswith(prefix):
                return True
        return False
    for (card_type, lengths, prefixes) in CARD_TYPES:
        if matches(card_number, lengths, prefixes):
            return card_type

What's a good function header?
assistant
#Here is Python code to fix in prefixes:
.

def bankcard_type(card_number):