code: def _salt_send_domain_event(opaque, conn, domain, event, event_data):
      '''
      Helper function send a salt event for a libvirt domain.
  
      :param opaque: the opaque data that is passed to the callback.
                     This is a dict with 'prefix', 'object' and 'event' keys.
      :param conn: libvirt connection
      :param domain: name of the domain related to the event
      :param event: name of the event
      :param event_data: additional event data dict to send
      '''
      data = {
          'domain': {
              'name': domain.name(),
              'id': domain.ID(),
              'uuid': domain.UUIDString()
          },
          'event': event
      }
      data.update(event_data)
      _salt_send_event(opaque, conn, dataf _salt_send_domain_event(opaque, conn, domain, event, event_data):
      '''
      Helper function send a salt event for a libvirt domain.
  
      :param opaque: the opaque data that is passed to the callback.
                     This is a dict with 'prefix', 'object' and 'event' keys.
      :param conn: libvirt connection
      :param domain: name of the domain related to the event
      :param event: name of the event
      :param event_data: additional event data dict to send
      '''
      data = {
          'domain': {
              'name': domain.name(),
              'id': domain.ID(),
              'uuid': domain.UUIDString()
          },
          'event': event
      }
      data.update(event_data)
      _salt_send_event(opaque, conn, data)
docs: Helper function send a salt event for a libvirt domain.
  
      :param opaque: the opaque data that is passed to the callback.
                     This is a dict with 'prefix', 'object' and 'event' keys.
      :param conn: libvirt connection
      :param domain: name of the domain related to the event
      :param event: name of the event
      :param event_data: additional event data dict to send