def METHOD_NAME():
    with patch("salt.engines.libvirt_events.libvirt") as METHOD_NAME:
        METHOD_NAME.getVersion.return_value = 2000000
        METHOD_NAME.virEventRunDefaultImpl.return_value = -1  # Don't loop for ever
        METHOD_NAME.VIR_DOMAIN_EVENT_ID_LIFECYCLE = 0
        METHOD_NAME.VIR_DOMAIN_EVENT_ID_REBOOT = 1
        METHOD_NAME.VIR_STORAGE_POOL_EVENT_ID_LIFECYCLE = 0
        METHOD_NAME.VIR_STORAGE_POOL_EVENT_ID_REFRESH = 1
        METHOD_NAME.VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE = 0
        METHOD_NAME.VIR_NODE_DEVICE_EVENT_ID_UPDATE = 1
        yield METHOD_NAME