def setRoles(self, *args, **kwargs):
try:<EOL><INDENT>role = self.mamburoleclass(entid=self['<STR_LIT>']['<STR_LIT>'], *args, **kwargs)<EOL><DEDENT>except KeyError:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>except AttributeError as ae:<EOL><INDENT>from .mamburoles import MambuRole<EOL>self.mamburoleclass = MambuRole<EOL>try:<EOL><INDENT>role = self.mamburoleclass(entid=self['<STR_LIT>']['<STR_LIT>'], *args, **kwargs)<EOL><DEDENT>except KeyError:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT><DEDENT>self['<STR_LIT>']['<STR_LIT>'] = role<EOL>return <NUM_LIT:1><EOL>
Adds the role assigned to this user to a 'role' field.

        Depends on the 'role' field that comes with a fullDetails=True
        build of the MambuUser.

        Returns the number of requests done to Mambu.