code: def register_log_producer_for_main_logger_thread_to_consume(
      logging_queue: Queue,
  ):
      if logging_queue is not None:
          queue_handler = logging.handlers.QueueHandler(logging_queue)
          root = logging.getLogger()
          root.setLevel(logging.DEBUG)
          root.addHandler(queue_handler)
  
imports: import logging
  import re
  import sys
  from threading import Thread
  from io import StringIO
  from multiprocessing import Queue
  from typing import IO, Dict, List, Optional
label_desc: Use image node_id 1 for calling a global function with example usage: register_log_producer_for_main_logger_thread_to_consume(logging_queue) without return types