<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tournament_name2number(self, name):
 """Translate tournament name to tournament number. Args: name (str):
 tournament name to translate Returns: number (int):
 number of the tournament or `None` if unknown. Examples: 4 None """

        tournaments = self.get_tournaments()
        d = {t['name']: t['tournament'] for t in tournaments}
        return d.get(name, None)