code: def test_auto_detected_more_than_visible(monkeypatch, shutdown_only):
      with patch.dict(sys.modules):
          sys.modules["acl"] = __import__("mock_acl")
  
          with patch.object(
              Accelerator,
              "get_current_node_num_accelerators",
              return_value=4,
          ):
              # If more NPUs are detected than visible.
              monkeypatch.setenv("ASCEND_RT_VISIBLE_DEVICES", "0,1,2")
  
              ray.init()
              assert ray.available_resources()["NPU"] == 3
  
file_path: ray/python/ray/tests/accelerators/test_npu.py
imports: import os
  import sys
  import pytest
  from unittest.mock import patch
  import ray
  from ray._private.accelerators import NPUAcceleratorManager
label_desc: Use image node_id 9 for calling a global function with example usage: test_auto_detected_more_than_visible(monkeypatch, shutdown_only) without return types