def METHOD_NAME(test, vm, params):
    """
    Trigger system crash with certain method.
    :param vm: target vm
    :parma params: test params
    """
    crash_method = params["crash_method"]
    if crash_method == "nmi":
        vm.monitor.nmi()
    elif crash_method in ("usb_keyboard", "ps2_keyboard"):
        crash_key1 = params["crash_key1"]
        crash_key2 = params["crash_key2"]
        vm.monitor.press_release_key(crash_key1)
        vm.send_key(crash_key2)
        vm.send_key(crash_key2)
    elif crash_method == "notmyfault_app":
        timeout = int(params.get("timeout", 360))
        session = vm.wait_for_login(timeout=timeout)
        cmd = params["notmyfault_cmd"] % random.randint(1, 8)
        notmyfault_cmd = utils_misc.set_winutils_letter(session, cmd)
        try:
            status, output = session.cmd_status_output(cmd=notmyfault_cmd,
                                                       timeout=timeout)
            if status:
                test.error("Command '%s' failed, status: %s, output: %s" %
                           (cmd, status, output))
        # notmyfault_app triggers BSOD of the guest, and it terminates
        # qemu process, so sometimes, it can not get the status of the cmd.
        except (aexpect.ShellTimeoutError,
                aexpect.ShellProcessTerminatedError,
                aexpect.ShellStatusError):
            pass
    else:
        test.cancel("Crash trigger method %s not supported, "
                    "please check cfg file for mistake." % crash_method)