def flip_card_into_kind(card):

    if not card:
        return None
    kind = card.data.get('kind')
    if kind in card_map:
        return card_map[kind](card.data)
Given a general card model (before removing extra fields),
dataset/ETHPy150Open heiskr/sagefy/server/modules/entity.py/flip_card_into_kind