code: def get_ag_system_info(
      *,
      path: str = None,
      include_gpu_count=False,
      include_pytorch=False,
      include_cuda=False,
  ) -> str:
      resource_manager: ResourceManager = get_resource_manager()
      system_num_cpus = resource_manager.get_cpu_count()
      available_mem = ResourceManager.get_available_virtual_mem("GB")
      total_mem = ResourceManager.get_memory_size("GB")
      mem_avail_percent = available_mem / total_mem
      version = __version__
      python_version = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
      msg_list = [
          f"=================== System Info ===================",
          f"AutoGluon Version:  {version}",
          f"Python Version:     {python_version}",
          f"Operating System:   {platform.system()}",
          f"Platform Machine:   {platform.machine()}",
          f"Platform Version:   {platform.version()}",
          f"CPU Count:          {system_num_cpus}",
      ]
      if include_pytorch:
          try:
              import torch
  
              torch_version = torch.__version__
          except Exception as e:
              torch_version = "Can't import torch"
          msg_list.append(f"Pytorch Version:    {torch_version}")
      if include_cuda:
          try:
              import torch
  
              if torch.cuda.is_available():
                  cuda_version = torch.version.cuda
              else:
                  cuda_version = "CUDA is not available"
          except Exception as e:
              cuda_version = "Can't get cuda version from torch"
          msg_list.append(f"CUDA Version:       {cuda_version}")
      if include_gpu_count:
          try:
              system_num_gpus = resource_manager.get_gpu_count_torch()
          except Exception as e:
              system_num_gpus = f"WARNING: Exception was raised when calculating GPU count ({e.__class__.__name__})"
          msg_list.append(f"GPU Count:          {system_num_gpus}")
  
      msg_list.append(
          f"Memory Avail:       {available_mem:.2f} GB / {total_mem:.2f} GB ({mem_avail_percent * 100:.1f}%)"
      )
  
      if path is not None:
          disk_avail_msg, _ = get_ag_system_info_disk_space(path=path)
          msg_list.append(disk_avail_msg)
      msg_list.append(
          f"==================================================="
      )
  
      msg = "\n".join(msg_list)
      return msg
  
imports: import platform
  import sys
  from typing import Tuple
  from ..None import __version__
  from .resource_utils import ResourceManager, get_resource_manager
label_desc: Use image node_id 2 for calling a global function with example usage: get_ag_system_info() and returns: msg