code: def get_hw_setup(device: Device = None) -> HardwareSetup:
      accelerator = None
      if (
          device is not None and device.type is DeviceType.GPU
      ) or gpu_is_available():
          accelerator = _get_gpu_name()
      elif (
          device is not None and device.type is DeviceType.TPU
      ) or tpu_is_available():
          accelerator = _get_tpu_device_name()
      elif (
          device is not None and device.type is DeviceType.NEURON
      ) or neuron_is_available():
          accelerator = _get_neuron_device_name()
      return HardwareSetup(
          cpu=cpuinfo.get_cpu_info()["brand_raw"],
          operating_system=platform.system(),
          memory_gb=round(psutil.virtual_memory().total * 1e-9, 2),
          accelerator=accelerator,
      )
  
file_path: nebuly/optimization/nebullvm/nebullvm/tools/hardware_utils.py
imports: import os
  import platform
  import cpuinfo
  import psutil
  from nebullvm.core.models import HardwareSetup, Device, DeviceType
  from nebullvm.optional_modules.torch_xla import xm
  from nebullvm.optional_modules.utils import torch_is_available, tensorflow_is_available
  from nebullvm.tools.pytorch import torch_get_device_name
  from nebullvm.tools.tf import tensorflow_get_gpu_name
  from nebullvm.tools.utils import gpu_is_available, tpu_is_available, neuron_is_available
label_desc: Use image node_id 1 for calling a global function with example usage: get_hw_setup(device) and returns: HardwareSetup