def METHOD_NAME():
    """
    Define guest, check xml, check memory
    """
    test.log.info("TEST_SETUP1: Define guest")
    vmxml = vm_xml.VMXML.new_from_dumpxml(vm_name)
    vmxml.setup_attrs(**vm_attrs)
    result = virsh.define(vmxml.xml, debug=True)
    if globals()["config_error"]:
        if not re.search(globals()["config_error"], result.stderr_text):
            test.fail("Define guest should get error %s instead of %s" % (
                globals()["config_error"], result))
        else:
            return
    else:
        libvirt.check_exit_status(result)
    test.log.info("TEST_SETUP2: Check xml")
    vmxml = vm_xml.VMXML.new_from_dumpxml(vm_name)
    test.log.debug("The new xml is:\n%s", vmxml)
    libvirt_vmxml.check_guest_xml_by_xpaths(vmxml, expect_xpath)
    test.log.info("TEST_STEP3: Start vm")
    if not vm.is_alive():
        vm.start()
    vm.wait_for_login().close()
    test.log.info("TEST_STEP4: Check memory")
    pid = process.run('pidof qemu-kvm', shell=True).stdout_text.strip()
    test.log.debug("Get qemu-kvm pid:%s", pid)
    address = process.run('grep -B1 %s /proc/%s/smaps' % (
        allocated_mem, pid), shell=True).stdout_text.split("-")[0]
    test.log.debug("Get address:%s", address)
    result = process.run('grep %s /proc/%s/numa_maps' % (address, pid), shell=True).stdout_text
    check_numa_maps(test, params, result)