"""Defines a struct representing a single card. The struct takes the form:(front, back)"""fromcollectionsimportnamedtuplefromhashlibimportmd5Card=namedtuple('Card',['front','back'])defgetId(card:Card)->str:returnmd5((card.front+card.back).encode("utf-8")).hexdigest()