docstr: Initializes a thread-safe log stream over a Ray Client gRPC channel.
  
  Args:
      client_worker: The Ray Client worker that manages this client
      metadata: metadata to pass to gRPC requests
docstr_tok: ["Initializes","a","thread-safe","log","stream","over","a","Ray","Client","gRPC","channel",".","Args",":","client_worker",":","The","Ray","Client","worker","that","manages","this","client","metadata",":","metadata","to","pass","to","gRPC","requests"]
code: def __init__(self, client_worker: "Worker", metadata: list):
      """Initializes a thread-safe log stream over a Ray Client gRPC channel.
  
      Args:
          client_worker: The Ray Client worker that manages this client
          metadata: metadata to pass to gRPC requests
      """
      self.client_worker = client_worker
      self._metadata = metadata
      self.request_queue = queue.Queue()
      self.log_thread = self._start_logthread()
      self.log_thread.start()
      self.last_req = None
  
file_path: ray/python/ray/util/client/logsclient.py
imports: import sys
  import logging
  import queue
  import threading
  import time
  import grpc
  from typing import TYPE_CHECKING
  import ray.core.generated.ray_client_pb2
  import ray.core.generated.ray_client_pb2_grpc
  from ray.util.debug import log_once
label_desc: Use image node_id 1 to create a new LogstreamClient object  with example: obj = LogstreamClient(client_worker, metadata)