<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_to_groups(self, username, groups):
 """ Add a user to a list of groups :param username: 'key' attribute of the user :type username: string :param groups: list of groups :type groups: list of strings """

        self._check_fix_users(username)
        current_groups = self.users[username]['groups']
        new_groups = current_groups | set(groups)
        self.users[username]['groups'] = new_groups