code: def add_role(self, role):
          
          schema = RoleSchema()
          ok = schema.process(role)
          if not ok or not role.id:
              err = 'Role must be valid and saved before adding to user'
              raise x.UserException(err)
  
          self.__roles.append(role)
docs: Add role to user
          Role must be valid and saved first, otherwise will
          raise an exception.