code: def has_client_deprecation_warn(
      warning: Warning, expected_replacement: str
  ) -> bool:
      """
      Returns true if expected_replacement is in the message of the passed
      warning, and that the warning mentions deprecation.
      """
      start = "Starting a connection through `ray.client` will be deprecated"
      message = str(warning.message)
      if start not in message:
          return False
      if expected_replacement not in message:
          return False
      return True
  
imports: import os
  import subprocess
  import sys
  import warnings
  from unittest.mock import Mock, patch
  import pytest
  import ray
  import ray.client_builder
  import ray.util.client.server.server
  from ray._private.test_utils import run_string_as_driver, run_string_as_driver_nonblocking, wait_for_condition, skip_flaky_core_test_premerge
  from ray.util.state import list_workers
label_desc: Use image node_id 11 for calling a global function with example usage: has_client_deprecation_warn(warning, expected_replacement) and returns: True, False, False