def setGroups(self, *args, **kwargs):
requests = <NUM_LIT:0><EOL>groups = []<EOL>try:<EOL><INDENT>for gk in self['<STR_LIT>']:<EOL><INDENT>try:<EOL><INDENT>g = self.mambugroupclass(entid=gk, *args, **kwargs)<EOL><DEDENT>except AttributeError as ae:<EOL><INDENT>from .mambugroup import MambuGroup<EOL>self.mambugroupclass = MambuGroup<EOL>g = self.mambugroupclass(entid=gk, *args, **kwargs)<EOL><DEDENT>requests += <NUM_LIT:1><EOL>groups.append(g)<EOL><DEDENT><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>self['<STR_LIT>'] = groups<EOL>return requests<EOL>
Adds the groups to which this client belongs.

        The 'groupKeys' field of the client holds a list of the
        encodedKeys of the groups to which this client belongs.

        Returns the number of requests done to Mambu.