code: def test_publish_and_subscribe_error_info(
      ray_start_regular_with_external_redis,
  ):
      address_info = ray_start_regular_with_external_redis
      gcs_server_addr = address_info["gcs_address"]
  
      subscriber = ray._raylet.GcsErrorSubscriber(
          address=gcs_server_addr
      )
      subscriber.subscribe()
  
      publisher = ray._raylet.GcsPublisher(address=gcs_server_addr)
      print("sending error message 1")
      publisher.publish_error(b"aaa_id", "", "test error message 1")
  
      ray._private.worker._global_node.kill_gcs_server()
      ray._private.worker._global_node.start_gcs_server()
  
      print("sending error message 2")
      publisher.publish_error(b"bbb_id", "", "test error message 2")
      print("done")
  
      (key_id, err) = subscriber.poll()
      assert key_id == b"bbb_id"
      assert err["error_message"] == "test error message 2"
  
      subscriber.close()
  
imports: import sys
  import os
  import threading
  from time import sleep
  import pytest
  import ray
  from ray._private.utils import get_or_create_event_loop
  from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy
  import ray._private.gcs_utils
  from ray._private import ray_constants
  from ray._private.test_utils import convert_actor_state, enable_external_redis, generate_system_config_map, wait_for_condition, wait_for_pid_to_exit, run_string_as_driver
  from ray.job_submission import JobSubmissionClient, JobStatus
  from ray._raylet import GcsClient
  import psutil
label_desc: Use image node_id 17 for calling a global function with example usage: test_publish_and_subscribe_error_info(ray_start_regular_with_external_redis) without return types