def METHOD_NAME(
    master_url: str,
    cert: certs.Cert,
    task_logging_metadata: Dict[str, Any],
    emit_stdout_logs: bool,
) -> None:
    ship_queue = queue.Queue(maxsize=SHIP_QUEUE_MAX_SIZE)
    collector = LogCollector(ship_queue, task_logging_metadata, emit_stdout_logs)
    shipper = LogShipper(ship_queue, master_url, cert)
    collector.start()
    shipper.start()
    # Collector will exit when it sees the end of stdin.
    collector.join()
    shipper.join()