code: def test_ray_init_credentials_with_client(monkeypatch):
      def mock_init(
          self,
          conn_str="",
          secure=False,
          metadata=None,
          connection_retries=3,
          _credentials=None,
      ):
          raise (Stop(_credentials))
  
      monkeypatch.setattr(Worker, "__init__", mock_init)
      with pytest.raises(Stop) as stop:
          with ray_start_client_server(
              _credentials=Credentials("test")
          ):
              pass
  
      assert stop.value.credentials.name == "test"
  
imports: import os
  import sys
  import unittest.mock
  import signal
  import subprocess
  import grpc
  import pytest
  import ray
  import ray._private.services
  from ray.client_builder import ClientContext
  from ray.cluster_utils import Cluster
  from ray.util.client.common import ClientObjectRef
  from ray.util.client.ray_client_helpers import ray_start_client_server
  from ray.util.client.worker import Worker
  from ray._private.test_utils import wait_for_condition, enable_external_redis
label_desc: Use image node_id 6 for calling a global function with example usage: test_ray_init_credentials_with_client(monkeypatch) without return types