<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_user(self, user, group):
 """ Adds user to a group """

        if self.is_user_in(user, group):
            raise UserAlreadyInAGroup
        self.new_groups.add(group, user)