def METHOD_NAME(vm):
    """
    Function that prepares a test environment and guest.
    :params vm: The virtual machine object
    """
    if vm.is_alive():
        vm.destroy(gracefully=False)
    libvirt_vmxml.remove_vm_devices_by_type(vm, "rng")