code: def test_create_metrics_with_gpu(self):
      # given
      system_resource_info = SystemResourceInfo(
          cpu_core_count=4,
          memory_amount_bytes=16 * BYTES_IN_ONE_GB,
          gpu_card_indices=[0, 1],
          gpu_memory_amount_bytes=8 * BYTES_IN_ONE_GB,
      )
      # and
      metrics_factory = MetricsFactory(
          self.gauge_factory, system_resource_info
      )
  
      # when
      metrics_container = metrics_factory.create_metrics_container()
  
      # then
      self.assertEqual(
          Metric(
              name="CPU - usage",
              description="average of all cores",
              resource_type=MetricResourceType.CPU,
              unit="%",
              min_value=0.0,
              max_value=100.0,
              gauges=[SystemCpuUsageGauge()],
          ),
          metrics_container.cpu_usage_metric,
      )
      # and
      self.assertEqual(
          Metric(
              name="RAM",
              description="",
              resource_type=MetricResourceType.RAM,
              unit="GB",
              min_value=0.0,
              max_value=16.0,
              gauges=[SystemMemoryUsageGauge()],
          ),
          metrics_container.memory_metric,
      )
      # and
      self.assertEqual(
          Metric(
              name="GPU - usage",
              description="2 cards",
              resource_type=MetricResourceType.GPU,
              unit="%",
              min_value=0.0,
              max_value=100.0,
              gauges=[
                  GpuUsageGauge(card_index=0),
                  GpuUsageGauge(card_index=1),
              ],
          ),
          metrics_container.gpu_usage_metric,
      )
      # and
      self.assertEqual(
          Metric(
              name="GPU - memory",
              description="2 cards",
              resource_type=MetricResourceType.GPU_RAM,
              unit="GB",
              min_value=0.0,
              max_value=8.0,
              gauges=[
                  GpuMemoryGauge(card_index=0),
                  GpuMemoryGauge(card_index=1),
              ],
          ),
          metrics_container.gpu_memory_metric,
      )
  
file_path: neptune-client/tests/unit/neptune/legacy/internal/hardware/metrics/test_metrics_factory.py
imports: import unittest
  from neptune.common.hardware.constants import BYTES_IN_ONE_GB
  from neptune.common.hardware.gauges.cpu import SystemCpuUsageGauge
  from neptune.common.hardware.gauges.gauge_factory import GaugeFactory, GpuMemoryGauge, GpuUsageGauge, SystemMemoryUsageGauge
  from neptune.common.hardware.gauges.gauge_mode import GaugeMode
  from neptune.common.hardware.metrics.metric import Metric, MetricResourceType
  from neptune.common.hardware.metrics.metrics_factory import MetricsFactory
  from neptune.common.hardware.resources.system_resource_info import SystemResourceInfo
label_desc: Use image node_id 2 for calling the TestMetricsFactory obj's underlying member method code with example usage: obj.test_create_metrics_with_gpu() without return types