code: def test_gpu_memory_gauge(self, nvmlDeviceGetMemoryInfo):
      # given
      gauge = GpuMemoryGauge(card_index=self.card_index)
      # and
      memory_info = MagicMock()
      memory_info.used = 3 * BYTES_IN_ONE_GB
      nvmlDeviceGetMemoryInfo.side_effect = (
          lambda handle: memory_info
          if handle == self.gpu_card_handle
          else None
      )
  
      # when
      memory_gb = gauge.value()
  
      # then
      self.assertEqual(memory_gb, 3.0)
      self.assertEqual(float, type(memory_gb))
  
file_path: neptune-client/tests/unit/neptune/legacy/internal/hardware/gauges/test_gpu_gauges.py
imports: import unittest
  from mock import MagicMock, patch
  from neptune.common.hardware.constants import BYTES_IN_ONE_GB
  from neptune.common.hardware.gauges.gpu import GpuMemoryGauge, GpuUsageGauge
label_desc: Use image node_id 3 for calling the TestGPUGauges obj's underlying member method code with example usage: obj.test_gpu_memory_gauge(nvmlDeviceGetMemoryInfo) without return types