def lazy_load_library_exists(self):
        """check if libvirt is available."""
        # try to connect libvirt. if fail, skip test.
        try:
            import libvirt
            import libxml2
        except __HOLE__:
            return False
        global libvirt
        libvirt = __import__('libvirt')
        connection.libvirt = __import__('libvirt')
        connection.libxml2 = __import__('libxml2')
        return True
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/tests/test_libvirt.py/IptablesFirewallTestCase.lazy_load_library_exists