code: def add_to_groups(self, username, groups):
          
          self._check_fix_users(username)
          current_groups = self.users[username]['groups']
          new_groups = current_groups | set(groups)
          self.users[username]['groups'] = new_groups
docs: 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