def check_levelup(card):
    if 'level' in card.text.text:
        uplines = 0
        llines = 0
        for line in card.text_lines:
            if 'countertype ' + utils.counter_marker + ' level' in line.text:
                uplines += 1
                llines += 1
            elif 'with level up' in line.text:
                llines += 1
            elif 'level up' in line.text:
                uplines += 1
            elif 'level' in line.text:
                llines += 1
        return uplines == 1 and llines > 0
    else:
        return None
dataset/ETHPy150Open billzorn/mtgencode/scripts/mtg_validate.py/check_levelup/original