code: def open_capture_files(log_dir):
      filename = f"agent-{args.agent_id}"
      return (
          ray._private.utils.open_log(
              pathlib.Path(log_dir) / f"{filename}.out"
          ),
          ray._private.utils.open_log(
              pathlib.Path(log_dir) / f"{filename}.err"
          ),
      )
  
imports: import argparse
  import asyncio
  import json
  import logging
  import logging.handlers
  import os
  import pathlib
  import sys
  import signal
  import ray
  import ray._private.ray_constants
  import ray._private.services
  import ray._private.utils
  import ray.dashboard.consts
  import ray.dashboard.utils
  from ray._private.process_watcher import create_check_raylet_task
  from ray._private.gcs_utils import GcsAioClient
  from ray._private.ray_logging import setup_component_logger, configure_log_file
  from ray._private.ray_constants import AGENT_GRPC_MAX_MESSAGE_LENGTH
label_desc: Use image node_id 1 for calling a global function with example usage: open_capture_files(log_dir) and returns: ray,  ray