code: def test_invalid_unicode_in_worker_log(shutdown_only):
      info = ray.init(num_cpus=1)
  
      logs_dir = os.path.join(info["session_dir"], "logs")
  
      # Wait till first worker log file is created.
      while True:
          log_file_paths = glob.glob(f"{logs_dir}/worker*.out")
          if len(log_file_paths) == 0:
              time.sleep(0.2)
          else:
              break
  
      with open(log_file_paths[0], "wb") as f:
          f.write(b"\xe5abc\nline2\nline3\n")
          f.write(b"\xe5abc\nline2\nline3\n")
          f.write(b"\xe5abc\nline2\nline3\n")
          f.flush()
  
      # Wait till the log monitor reads the file.
      time.sleep(1.0)
  
      # Make sure that nothing has died.
      assert ray._private.services.remaining_processes_alive()
  
imports: import glob
  import logging
  import multiprocessing
  import os
  import sys
  import tempfile
  import time
  from unittest import mock
  import numpy
  import psutil
  import pytest
  import ray
  import ray._private.gcs_utils
  import ray._private.ray_constants
  import ray._private.utils
  import ray.cluster_utils
  import ray.util.accelerators
  from ray._private.test_utils import wait_for_condition
  from ray.dashboard import k8s_utils
  from ray.runtime_env import RuntimeEnv
label_desc: Use image node_id 2 for calling a global function with example usage: test_invalid_unicode_in_worker_log(shutdown_only) without return types