code: def collect_system_specs() -> Dict[str, Any]:
      """
      Collects meta data about the setup that is used with Haystack, such as:
      operating system, python version, Haystack version, transformers version,
      pytorch version, number of GPUs, execution environment.
  
      These values are highly unlikely to change during the runtime of the pipeline,
      so they're collected only once.
      """
      specs = {
          "libraries.haystack": __version__,
          "os.containerized": _is_containerized(),
          "os.version": platform.release(),
          "os.family": platform.system(),
          "os.machine": platform.machine(),
          "python.version": platform.python_version(),
          "hardware.cpus": os.cpu_count(),
          "hardware.gpus": 0,
          "libraries.transformers": False,
          "libraries.torch": False,
          "libraries.cuda": False,
          "libraries.pytest": sys.modules["pytest"].__version__
          if "pytest" in sys.modules.keys()
          else False,
          "libraries.ipython": sys.modules["ipython"].__version__
          if "ipython" in sys.modules.keys()
          else False,
          "libraries.colab": sys.modules["google.colab"].__version__
          if "google.colab" in sys.modules.keys()
          else False,
      }
  
      # Try to find out transformer's version
      try:
          import transformers
  
          specs["libraries.transformers"] = transformers.__version__
      except ImportError:
          pass
  
      # Try to find out torch's version and info on potential GPU(s)
      try:
          import torch
  
          specs["libraries.torch"] = torch.__version__
          if torch.cuda.is_available():
              specs["libraries.cuda"] = torch.version.cuda
              specs["libraries.gpus"] = torch.cuda.device_count()
      except ImportError:
          pass
      return specs
  
file_path: haystack/haystack/telemetry/_environment.py
imports: import logging
  import os
  import platform
  import sys
  from typing import Optional, Dict, Any
  from haystack.version import __version__
label_desc: Use image node_id 6 for calling a global function with example usage: collect_system_specs() and returns: specs