def METHOD_NAME():
    """
    Create cpu xml
    :return: cpu object
    """
    cpu_xml = vm_xml.VMCPUXML()
    cache_attrs = {}
    if cpu_mode:
        cpu_xml.mode = cpu_mode
    if cache_level:
        cache_attrs.update({'level': cache_level})
    if cache_mode:
        cache_attrs.update({'mode': cache_mode})
    cpu_xml.cache = cache_attrs
    logging.debug(cpu_xml)
    return cpu_xml