code: def _check_extension_features(self):
      info = cpuinfo.get_cpu_info()
      if "arch" in info and "X86" in info["arch"]:
          # get cpu features from cpuid
          cpuid = cpuinfo.CPUID()
          max_extension_support = cpuid.get_max_extension_support()
          if max_extension_support >= 7:
              # get extended feature bits
              # EAX = 7, ECX = 0
              # https://en.wikipedia.org/wiki/CPUID#EAX=7,_ECX=0:_Extended_Features
              ebx = cpuid._run_asm(
                  b"\x31\xC9",  # xor ecx, ecx
                  b"\xB8\x07\x00\x00\x00"  # mov eax, 7
                  b"\x0f\xa2"  # cpuid
                  b"\x89\xD8"  # mov ax, bx
                  b"\xC3",  # ret
              )
              ecx = cpuid._run_asm(
                  b"\x31\xC9",  # xor ecx, ecx
                  b"\xB8\x07\x00\x00\x00"  # mov eax, 7
                  b"\x0f\xa2"  # cpuid
                  b"\x89\xC8"  # mov ax, cx
                  b"\xC3",  # ret
              )
              edx = cpuid._run_asm(
                  b"\x31\xC9",  # xor ecx, ecx
                  b"\xB8\x07\x00\x00\x00"  # mov eax, 7
                  b"\x0f\xa2"  # cpuid
                  b"\x89\xD0"  # mov ax, dx
                  b"\xC3",  # ret
              )
              avx512_f = bool(ebx & (1 << 16))
              avx512_vnni = bool(ecx & (1 << 11))
              amx_bf16 = bool(edx & (1 << 22))
              amx_tile = bool(edx & (1 << 24))
  
              # EAX = 7, ECX = 1
              # https://en.wikipedia.org/wiki/CPUID#EAX=7,_ECX=1:_Extended_Features
              eax = cpuid._run_asm(
                  b"\xB9\x01\x00\x00\x00",  # mov ecx, 1
                  b"\xB8\x07\x00\x00\x00"  # mov eax, 7
                  b"\x0f\xa2"  # cpuid
                  b"\xC3",  # ret
              )
  
              avx512_bf16 = bool(eax & (1 << 5))
  
              self._bf16 = avx512_bf16 or amx_bf16
              self._avx512 = (
                  avx512_f or avx512_vnni or amx_tile or self._bf16
              )
  
imports: import cpuinfo
label_desc: Use image node_id 2 for calling the CPUInfo obj's underlying member method code with example usage: obj._check_extension_features() without return types