code: def read_cpu_flags() -> dict[str, bool]:
      # Right now we only enable extra feature flags for x86.
      if _POLARS_ARCH != "x86-64":
          return {}
  
      # CPU flags from https://en.wikipedia.org/wiki/CPUID
      cpuid = CPUID()
      cpuid1 = cpuid(1, 0)
      cpuid7 = cpuid(7, 0)
      cpuid81h = cpuid(0x80000001, 0)
  
      return {
          "sse3": bool(cpuid1.ecx & (1 << 0)),
          "ssse3": bool(cpuid1.ecx & (1 << 9)),
          "fma": bool(cpuid1.ecx & (1 << 12)),
          "sse4.1": bool(cpuid1.ecx & (1 << 19)),
          "sse4.2": bool(cpuid1.ecx & (1 << 20)),
          "popcnt": bool(cpuid1.ecx & (1 << 23)),
          "avx": bool(cpuid1.ecx & (1 << 28)),
          "bmi1": bool(cpuid7.ebx & (1 << 3)),
          "bmi2": bool(cpuid7.ebx & (1 << 8)),
          "avx2": bool(cpuid7.ebx & (1 << 5)),
          "lzcnt": bool(cpuid81h.ecx & (1 << 5)),
      }
  
file_path: polars/py-polars/polars/_cpu_check.py
imports: from __future__ import annotations
  import ctypes
  import os
  from ctypes import CFUNCTYPE, POINTER, c_long, c_size_t, c_uint32, c_ulong, c_void_p
  from typing import ClassVar
label_desc: Use image node_id 1 for calling a global function with example usage: read_cpu_flags() and returns: dict, dict