def toMessage(self, message=None):
        """Add the arguments from this extension to the provided
        message, or create a new message containing only those
        arguments.

        @returns: The message with the extension arguments added
        """
        if message is None:
            message = Message()

        try:
            message.namespaces.addAlias(self.ns_uri, self.ns_alias)
        except __HOLE__:
            if message.namespaces.getAlias(self.ns_uri) != self.ns_alias:
                raise

        message.updateArgs(self.ns_uri, self.getExtensionArgs())
        return message
dataset/ETHPy150Open CollabQ/CollabQ/openid/extension.py/Extension.toMessage