def METHOD_NAME(vm_session, test_obj, cpu_info_type, cmd):
    """
    Verify vm's cpu information
    :param vm_session: vm session
    :param test_obj: NumaTest object
    :param cpu_info_type: str, specified cpu info type, like 'cores', 'threads'
    :param cmd: str, the command used to check the cpu info
    """
    status, output = vm_session.cmd_status_output(cmd, timeout=300)
    if status:
        test_obj.test.error("Can't get cpu info with command '%s'" % cmd)
    cpu_info = eval(test_obj.params.get('cpu_topology'))[cpu_info_type]
    if cpu_info_type == 'cores':
        dies = eval(test_obj.params.get('cpu_topology'))['dies']
        cpu_info = str(int(cpu_info) * int(dies))
    if cpu_info != output.strip():
        test_obj.test.fail('Guest cpu %s is expected '
                           'to be %s, but found %s' % (cpu_info_type,
                                                       cpu_info,
                                                       output.strip()))
    else:
        test_obj.test.log.debug("Step: check vm cpu %s "
                                "to be '%s': PASS", cpu_info_type, cpu_info)