code: def test_report_and_send_metrics(self):
      # given
      experiment_start = time.time()
      second_after_start = experiment_start + 1.0
  
      # and
      experiment = MagicMock()
  
      # and
      metric_service = self.metric_service_factory.create(
          gauge_mode=GaugeMode.SYSTEM,
          experiment=experiment,
          reference_timestamp=experiment_start,
      )
      metrics_container = metric_service.metrics_container
  
      # when
      metric_service.report_and_send(timestamp=second_after_start)
  
      # then
      self.backend.send_hardware_metric_reports.assert_called_once_with(
          experiment,
          metrics_container.metrics(),
          [
              MetricReport(
                  metric=metrics_container.cpu_usage_metric,
                  values=[
                      MetricValue(
                          timestamp=second_after_start,
                          running_time=1.0,
                          gauge_name="cpu",
                          value=ANY,
                      )
                  ],
              ),
              MetricReport(
                  metric=metrics_container.memory_metric,
                  values=[
                      MetricValue(
                          timestamp=second_after_start,
                          running_time=1.0,
                          gauge_name="ram",
                          value=ANY,
                      )
                  ],
              ),
          ],
      )
  
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 3 for calling the TestMetricServiceIntegration obj's underlying member method code with example usage: obj.test_report_and_send_metrics() without return types