code: def test_should_ignore_gpu_indices_after_index_out_of_range(self):
      # given
      gpu_monitor = MagicMock(spec_set=GPUMonitor)
      gpu_monitor.get_card_count.return_value = 4
      # and
      system_resource_info_factory = SystemResourceInfoFactory(
          system_monitor=SystemMonitor(),
          gpu_monitor=gpu_monitor,
          os_environ={"CUDA_VISIBLE_DEVICES": "1,3,5,2"},
      )
  
      # when
      resource_info = system_resource_info_factory.create(
          GaugeMode.SYSTEM
      )
  
      # then
      self.assertEqual([1, 3], resource_info.gpu_card_indices)
  
imports: import os
  import unittest
  from mock import MagicMock
  from neptune.common.hardware.gauges.gauge_mode import GaugeMode
  from neptune.common.hardware.gpu.gpu_monitor import GPUMonitor
  from neptune.common.hardware.resources.system_resource_info_factory import SystemResourceInfoFactory
  from neptune.common.hardware.system.system_monitor import SystemMonitor
  from tests.unit.neptune.legacy.assertions import AssertionExtensions
label_desc: Use image node_id 4 for calling the TestSystemResourceInfoFactory obj's underlying member method code with example usage: obj.test_should_ignore_gpu_indices_after_index_out_of_range() without return types