I advise to move your operation about libvirtd's configurations to your new module utils_libvirtd.py.
It can be in good management and simplify this function.