def find_player(self, username: str = None):
        """Find the :class:`~.Player` with the given properties

        Returns the player whose attributes match the given properties, or
        ``None`` if no match is found.

        :param username: The username of the Player
        """
        if username != None:
            return next((player for player in self.players if player.name == username), None)
        else:
            return None
def find_player ( self , username : str = None ) : if username != None : return next ( ( player for player in self . players if player . name == username ) , None ) else : return None
Find the :class:`~.Player` with the given properties

        Returns the player whose attributes match the given properties, or
        ``None`` if no match is found.

        :param username: The username of the Player