code: def get_CPU_info():
      """
      Capture hardware information, such as CPU model, CPU informations, memory status
      """
  
      # information about CPU
      socket_num = int(
          subprocess.getoutput(
              'cat /proc/cpuinfo | grep "physical id" | '
              "sort -u | wc -l"
          )
      )
      model_name = subprocess.getoutput('lscpu | grep "Model name"')
      model_name = model_name.partition(":")[2]
  
      print(">" * 20, "Hardware Information", ">" * 20)
      print("\033[1m\tCPU architecture\033[0m:", platform.processor())
      print("\033[1m\tCPU model name\033[0m:", model_name.lstrip())
      print("\033[1m\tLogical Core(s)\033[0m:", cpu_count())
      print(
          "\033[1m\tPhysical Core(s)\033[0m:", cpu_count(logical=False)
      )
      print(
          "\033[1m\tPhysical Core(s) per socket\033[0m:",
          int(cpu_count(logical=False) / socket_num),
      )
      print("\033[1m\tSocket(s)\033[0m:", socket_num)
      print(
          "\033[1m\tCPU usage\033[0m:", str(psutil.cpu_percent()) + "%"
      )
      print(
          "\033[1m\tCPU MHz\033[0m:",
          format(psutil.cpu_freq().current, ".2f"),
      )
      print(
          "\033[1m\tCPU max MHz\033[0m:",
          format(psutil.cpu_freq().max, ".2f"),
      )
      print(
          "\033[1m\tCPU min MHz\033[0m:",
          format(psutil.cpu_freq().min, ".2f"),
      )
      print(
          "\033[1m\tTotal memory\033[0m:",
          get_bytesize(psutil.virtual_memory().total),
      )
      print(
          "\033[1m\tAvailable memory\033[0m:",
          get_bytesize(psutil.virtual_memory().available),
      )
  
      # support instruction set or not
      disabled_logo = "\033[0;31m\u2718\033[0m"
      abled_logo = "\033[0;32m\u2714\033[0m"
  
      for flag in ["avx512f", "avx512_bf16", "avx512_vnni"]:
          flag_enabled = int(
              subprocess.getoutput(f"lscpu | grep -c {flag} ")
          )
          if flag_enabled:
              print("\033[1m\tSupport\033[0m", flag, ":", abled_logo)
          else:
              print("\033[1m\tSupport\033[0m", flag, ":", disabled_logo)
  
      print("<" * 20, "Hardware Information", "<" * 20, "\n")
  
file_path: BigDL/python/chronos/src/bigdl/chronos/benchmark/env_check.py
imports: import psutil
  import platform
  import subprocess
  import os
  import logging
  import warnings
  from .utils_env import get_bytesize, _find_path, get_nano_env_var
  from bigdl.nano.utils.common import _env_variable_is_set, _find_library
  from psutil import cpu_count
label_desc: Use image node_id 1 for calling a global function with example usage: get_CPU_info() without return types