code: def test_create_system_metrics(self):
      # given
      memory_amount_gb = psutil.virtual_memory().total / float(
          BYTES_IN_ONE_GB
      )
  
      # and
      experiment = MagicMock()
  
      # and
      cpu_metric_id = str(uuid.uuid4())
      ram_metric_id = str(uuid.uuid4())
      self.backend.create_hardware_metric.side_effect = [
          cpu_metric_id,
          ram_metric_id,
      ]
  
      # when
      self.metric_service_factory.create(
          gauge_mode=GaugeMode.SYSTEM,
          experiment=experiment,
          reference_timestamp=time.time(),
      )
  
      # then
      self.backend.create_hardware_metric.assert_has_calls(
          [
              call(
                  experiment,
                  Metric(
                      internal_id=cpu_metric_id,
                      name="CPU - usage",
                      description="average of all cores",
                      resource_type=MetricResourceType.CPU,
                      unit="%",
                      min_value=0.0,
                      max_value=100.0,
                      gauges=[SystemCpuUsageGauge()],
                  ),
              ),
              call(
                  experiment,
                  Metric(
                      internal_id=ram_metric_id,
                      name="RAM",
                      description="",
                      resource_type=MetricResourceType.RAM,
                      unit="GB",
                      min_value=0.0,
                      max_value=memory_amount_gb,
                      gauges=[SystemMemoryUsageGauge()],
                  ),
              ),
          ]
      )
  
file_path: neptune-client/tests/unit/neptune/legacy/internal/hardware/metrics/test_metric_service_integration.py
imports: import os
  import time
  import unittest
  import uuid
  import psutil
  from mock import ANY, MagicMock, call
  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 SystemMemoryUsageGauge
  from neptune.common.hardware.gauges.gauge_mode import GaugeMode
  from neptune.common.hardware.metrics.metric import Metric, MetricResourceType
  from neptune.common.hardware.metrics.reports.metric_reporter import MetricReport, MetricValue
  from neptune.common.hardware.metrics.service.metric_service_factory import MetricServiceFactory
  from neptune.common.utils import IS_MACOS
label_desc: Use image node_id 2 for calling the TestMetricServiceIntegration obj's underlying member method code with example usage: obj.test_create_system_metrics() without return types