code: def check_cpu_flags() -> None:
      if (
          not _POLARS_FEATURE_FLAGS
          or _POLARS_LTS_CPU
          or os.environ.get("POLARS_SKIP_CPU_CHECK")
      ):
          return
  
      expected_cpu_flags = [
          f.lstrip("+") for f in _POLARS_FEATURE_FLAGS.split(",")
      ]
      supported_cpu_flags = read_cpu_flags()
  
      missing_features = []
      for f in expected_cpu_flags:
          if f not in supported_cpu_flags:
              raise RuntimeError(f'unknown feature flag "{f}"')
  
          if not supported_cpu_flags[f]:
              missing_features.append(f)
  
      if missing_features:
          import warnings  # Only import if necessary.
  
          warnings.warn(
              f"""Missing required CPU features.
  
  The following required CPU features were not detected:
      {", ".join(missing_features)}
  Continuing to use this version of Polars on this processor will likely result in a crash.
  Install the `polars-lts-cpu` package instead of `polars` to run Polars with better compatibility.
  
  Hint: If you are on an Apple ARM machine (e.g. M1) this is likely due to running Python under Rosetta.
  It is recommended to install a native version of Python that does not run under Rosetta x86-64 emulation.
  
  If you believe this warning to be a false positive, you can set the `POLARS_SKIP_CPU_CHECK` environment variable to bypass this check.
  """,
              RuntimeWarning,
              stacklevel=1,
          )
  
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 2 for calling a global function with example usage: check_cpu_flags() without return types