<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_group_by_name(self, group_name: str) -> typing.Optional['Group']: """ Gets a group from its name Args: group_name: Returns: Group """

        VALID_STR.validate(group_name, 'get_group_by_name')
        for group in self.groups:

            if group.group_name == group_name:
                return group
        return None