def get_group_by_id(self, group_id) -> typing.Optional['Group']:
        """
        Args:
            group_id: group ID

        Returns: Group
        """
        VALID_POSITIVE_INT.validate(group_id, 'get_group_by_id')
        for group in self.groups:

            if group.group_id == group_id:
                return group

        return None
def get_group_by_id ( self , group_id ) -> typing . Optional [ 'Group' ] : VALID_POSITIVE_INT . validate ( group_id , 'get_group_by_id' ) for group in self . groups : if group . group_id == group_id : return group return None
Args:
            group_id: group ID

        Returns: Group