code: def test_task_logs_info_running_task(shutdown_only):
      ray.init(num_cpus=1)
  
      @ray.remote
      def do_print_sleep(out_msg, err_msg):
          print(out_msg, end="", file=sys.stdout)
          print(err_msg, end="", file=sys.stderr)
          time.sleep(999)
  
      err_msg = "this is log line to stderr before sleeping\n"
      out_msg = "this is log line to stdout before sleeping\n"
      task_name = "log-running-task"
      do_print_sleep.options(name=task_name).remote(out_msg, err_msg)
  
      def verify():
          check_file("err", task_name, err_msg, expect_no_end=True)
          check_file("out", task_name, out_msg, expect_no_end=True)
          return True
  
      wait_for_condition(verify)
  
imports: import asyncio
  from collections import defaultdict
  import os
  from typing import Dict
  import pytest
  import sys
  import time
  from ray._private import ray_constants
  from functools import reduce
  import ray
  from ray._private.state_api_test_utils import PidActor, get_state_api_manager, verify_tasks_running_or_terminated, verify_failed_task
  from ray.util.state.common import ListApiOptions, StateResource
  from ray._private.test_utils import async_wait_for_condition_async_predicate, run_string_as_driver, run_string_as_driver_nonblocking, wait_for_condition
  from ray.util.state import StateApiClient, list_actors, list_jobs, list_tasks
label_desc: Use image node_id 18 for calling a global function with example usage: test_task_logs_info_running_task(shutdown_only) and returns: True