[libvirt] [PATCH v3 python 1/2] move cpumap conversion code to a common helper