def METHOD_NAME():
    error_context.context("Offline then online guest CPUs after vcpu %s"
                          % hotpluggable_test, test.log.info)
    cpu_ids = list(current_guest_cpu_ids - guest_cpu_ids)
    cpu_ids.sort()
    cmd = "echo %d > /sys/devices/system/cpu/cpu%d/online"
    try:
        for cpu_id in cpu_ids[::-1]:
            session.cmd(cmd % (0, cpu_id))
        if not cpu_utils.check_if_vm_vcpu_match(cpu_count_before_test, vm):
            test.fail(
                "Actual number of guest CPUs is not equal to expected")
        for cpu_id in cpu_ids:
            session.cmd(cmd % (1, cpu_id))
    except ShellCmdError as err:
        test.log.error(str(err))
        test.error("Failed to change the CPU state on guest.")