code: def test_psutil():
      # sudo apt-get install gcc python3-dev
      # xcode on mac
      # pip install psutil
      import psutil
  
      # https://psutil.readthedocs.io/en/latest/#
      inspect(
          mac=psutil.MACOS, linux=psutil.LINUX, windows=psutil.WINDOWS
      )
      inspect(psutil.net_io_counters()._asdict())
      inspect(psutil.net_if_addrs())
      inspect(psutil.net_if_stats())
      inspect(psutil.virtual_memory()._asdict())
      inspect(psutil.cpu_count())
      inspect(psutil.cpu_times()._asdict())
      inspect(psutil.cpu_stats()._asdict())
      inspect(psutil.cpu_freq()._asdict())
      inspect(psutil.cpu_percent(percpu=True))
      inspect(psutil.disk_usage(lab.get_path())._asdict())
      inspect(psutil.Process().as_dict())
      inspect([p for p in psutil.process_iter()])
      # inspect(psutil.Process().terminate())
      # inspect('test')
      p = psutil.Process()
      with p.oneshot():
          inspect(p.memory_info()._asdict())
          inspect(p.memory_percent())
          inspect(p.cpu_percent(1))
          inspect(p.cpu_times()._asdict())
          inspect(p.num_threads())
          inspect(p.threads())
          try:
              inspect(p.cpu_num())
          except AttributeError as e:
              pass
      try:
          inspect(psutil.sensors_temperatures())
      except AttributeError as e:
          pass
      try:
          inspect(psutil.sensors_fans())
      except AttributeError as e:
          pass
      try:
          inspect(psutil.sensors_battery()._asdict())
      except AttributeError as e:
          pass
  
imports: from labml import lab, logger
  from labml.logger import inspect
label_desc: Use image node_id 3 for calling a global function with example usage: test_psutil() without return types