code: def iam_client_stub(request):
      region = getattr(request, "param", "us-west-2")
      resource = resource_cache("iam", region)
      with Stubber(resource.meta.client) as stubber:
          yield stubber
          stubber.assert_no_pending_responses()
  
file_path: ray/python/ray/tests/aws/conftest.py
imports: import pytest
  from ray.autoscaler._private.constants import BOTO_MAX_RETRIES
  from ray.autoscaler._private.aws.utils import resource_cache, client_cache
  from botocore.stub import Stubber
label_desc: Use image node_id 1 for calling a global function with example usage: iam_client_stub(request) without return types