code: def test_receive_late_worker_logs():
      # Make sure that log messages from tasks appear in the stdout even if the
      # script exits quickly.
      # Set tqdm magic token to avoid log deduplicator.
      log_message = (
          "some helpful debugging message"
          + ray_constants.TESTING_NEVER_DEDUP_TOKEN
      )
  
      # Define a driver that creates a task that prints something, ensures that
      # the task runs, and then exits.
      driver_script = """
  import ray
  import random
  import time
  
  log_message = "{}"
  
  @ray.remote
  class Actor:
      def log(self):
          print(log_message)
  
  @ray.remote
  def f():
      print(log_message)
  
  ray.init(num_cpus=2)
  
  a = Actor.remote()
  ray.get([a.log.remote(), f.remote()])
  ray.get([a.log.remote(), f.remote()])
  """.format(
          log_message
      )
  
      for _ in range(2):
          out = run_string_as_driver(driver_script)
          assert out.count(log_message) == 4
  
file_path: ray/python/ray/tests/test_multi_node.py
imports: import os
  import sys
  import time
  import psutil
  import pytest
  import ray
  from ray._private import ray_constants
  from ray._private.test_utils import RayTestTimeoutException, get_error_message, init_error_pubsub, object_memory_usage, run_string_as_driver, run_string_as_driver_nonblocking, wait_for_condition
label_desc: Use image node_id 6 for calling a global function with example usage: test_receive_late_worker_logs() without return types