code: def iq_handler(stream, type_, payload_cls, coro, *, with_send_reply=False):
      
  
      stream.register_iq_request_handler(
          type_,
          payload_cls,
          coro,
          with_send_reply=with_send_reply,
      )
      try:
          yield
      finally:
          stream.unregister_iq_request_handler(type_, payload_cls)
docs: Context manager to temporarily register a coroutine to handle IQ requests
      on a :class:`StanzaStream`.
  
      :param stream: Stanza stream to register the coroutine at
      :type stream: :class:`StanzaStream`
      :param type_: IQ type to react to (must be a request type).
      :type type_: :class:`~aioxmpp.IQType`
      :param payload_cls: Payload class to react to (subclass of
                          :class:`~xso.XSO`)
      :type payload_cls: :class:`~.XMLStreamClass`
      :param coro: Coroutine to register
      :param with_send_reply: Whether to pass a function to send the reply
                              early to `cb`.
      :type with_send_reply: :class:`bool`
  
      The coroutine is registered when the context is entered and unregistered
      when the context is exited. Running coroutines are not affected by exiting
      the context manager.
  
      .. versionadded:: 0.11
  
         The `with_send_reply` argument. See
         :meth:`aioxmpp.stream.StanzaStream.register_iq_request_handler` for
         more detail.
  
      .. versionadded:: 0.8