code: def process_init(q: Queue, user_init: UserInit, loglevel) -> None:
      """Initialize a process pool worker."""
      # Ignore SIGINT (our parent process will kill us gracefully)
      signal.signal(signal.SIGINT, signal.SIG_IGN)
  
      # Install SIGBUS handler (so our parent process can abort somewhat gracefully)
      with suppress(
          AttributeError
      ):  # Windows and Cygwin do not have SIGBUS
          # Windows and Cygwin do not have pthread_sigmask or SIGBUS
          signal.signal(signal.SIGBUS, process_sigbus)
  
      # Remove any log handlers inherited from the parent process
      root = logging.getLogger()
      remove_all_log_handlers(root)
  
      # Set up our single log handler to forward messages to the parent
      root.setLevel(loglevel)
      root.addHandler(logging.handlers.QueueHandler(q))
  
      user_init()
      return
  
imports: from __future__ import annotations
  import logging
  import logging.handlers
  import multiprocessing
  import os
  import queue
  import signal
  import sys
  import threading
  from collections.abc import Iterable
  from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor, as_completed
  from contextlib import suppress
  from typing import Callable, Union
  from rich.console import Console
  from ocrmypdf import Executor, hookimpl
  from ocrmypdf._logging import RichLoggingHandler
  from ocrmypdf._progressbar import RichProgressBar
  from ocrmypdf.exceptions import InputFileError
  from ocrmypdf.helpers import remove_all_log_handlers
label_desc: Use image node_id 3 for calling a global function with example usage: process_init(q, user_init, loglevel) without return types