<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def publish(self, node, data, *, id_=None, access_model=None):
 """ Publish an item `data` in the PubSub node `node` on the PEP service associated with the user's JID. :param node: The PubSub node to publish to. :param data: The item to publish. :type data: An XSO representing the paylaod. :param id_: The id the published item shall have. :param access_model: The access model to enforce on the node. Defaults to not enforcing any access model. :returns: The PubSub id of the published item or :data:`None` if it is unknown. :raises RuntimeError: if PEP is not supported. :raises RuntimeError: if `access_model` is set and `publish_options` is not supported by the server If no `id_` is given it is generated by the server (and may be returned). `access_model` defines a pre-condition on the access model used for the `node`. The valid values depend on the service; commonly useful ``"presence"`` (the default for PEP; allows access to anyone who can receive the presence) and ``"whitelist"`` (allows access only to a whitelist (which defaults to the own account only)). """

        publish_options = None

        def autocreate_publish_options():
            nonlocal publish_options
            if publish_options is None:
                publish_options = aioxmpp.forms.Data(
                    aioxmpp.forms.DataType.SUBMIT
                )
                publish_options.fields.append(
                    aioxmpp.forms.Field(
                        type_=aioxmpp.forms.FieldType.HIDDEN,
                        var="FORM_TYPE",
                        values=[
                            "http://jabber.org/protocol/pubsub#publish-options"
                        ]
                    )
                )
            return publish_options

        if access_model is not None:
            autocreate_publish_options()
            publish_options.fields.append(aioxmpp.forms.Field(
                var="pubsub#access_model",
                values=[access_model],
            ))

        yield from self._check_for_pep()
        return (yield from self._pubsub.publish(
            None, node, data, id_=id_,
            publish_options=publish_options
        ))