def setGroups(self, *args, **kwargs):
try:<EOL><INDENT>groups = self.mambugroupsclass(creditOfficerUsername=self['<STR_LIT:username>'], *args, **kwargs)<EOL><DEDENT>except AttributeError as ae:<EOL><INDENT>from .mambugroup import MambuGroups<EOL>self.mambugroupsclass = MambuGroups<EOL>groups = self.mambugroupsclass(creditOfficerUsername=self['<STR_LIT:username>'], *args, **kwargs)<EOL><DEDENT>self['<STR_LIT>'] = groups<EOL>return <NUM_LIT:1><EOL>
Adds the groups assigned to this user to a 'groups' field.

        Returns the number of requests done to Mambu.