

def remove_card_by_id(self, card_id):
    'Remove card and return corresponding Component.'
    card_comp = filter((lambda x: (x().id == card_id)), self.cards)[0]
    try:
        self.remove_card(card_comp())
    except (IndexError, ValueError):
        raise ValueError('Card has been deleted or does not belong to this list anymore')
    return card_comp

dataset/ETHPy150Open Net-ng/kansha/kansha/column/comp.py Column.remove_card_by_id/original