<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def get_badge(self, kind):
        ''' Get a badge given its kind if present'''
        candidates = [b for b in self.badges if b.kind == kind]
        return candidates[0] if candidates else None