code: def test_visible_amd_gpu_ids(
      mock_get_num_accelerators, monkeypatch, shutdown_only
  ):
      monkeypatch.setenv("ROCR_VISIBLE_DEVICES", "0,1,2")
      # Delete the cache so it can be re-populated the next time
      # we call get_accelerator_manager_for_resource
      del (
          get_accelerator_manager_for_resource._resource_name_to_accelerator_manager
      )
      ray.init()
      mock_get_num_accelerators.called
      assert ray.available_resources()["GPU"] == 3
  
file_path: ray/python/ray/tests/accelerators/test_amd_gpu.py
imports: import os
  import sys
  import pytest
  from unittest.mock import patch
  import ray
  from ray._private.accelerators import AMDGPUAcceleratorManager
  from ray._private.accelerators import get_accelerator_manager_for_resource
label_desc: Use image node_id 1 for calling a global function with example usage: test_visible_amd_gpu_ids(mock_get_num_accelerators, monkeypatch, shutdown_only) without return types