code: def register(self, func):
          
          assert callable(func)
          assert inspect.getargspec(func).args == ["user", "privilege"]
          self.handlers.add(func)
docs: func must have signature func(user, privilege) and return a boolean.