code: def remove_all_log_handlers(logger: logging.Logger) -> None:
      """Remove all log handlers, usually used in a child process.
  
      The child process inherits the log handlers from the parent process when
      a fork occurs. Typically we want to remove all log handlers in the child
      process so that the child process can set up a single queue handler to
      forward log messages to the parent process.
      """
      for handler in logger.handlers[:]:
          logger.removeHandler(handler)
          handler.close()
  
imports: from __future__ import annotations
  import logging
  import multiprocessing
  import os
  import shutil
  import warnings
  from collections.abc import Iterable, Sequence
  from contextlib import suppress
  from decimal import Decimal
  from io import StringIO
  from math import isclose, isfinite
  from pathlib import Path
  from statistics import harmonic_mean
  from typing import Any, Callable, Generic, TypeVar
  import img2pdf
  import pikepdf
label_desc: Use image node_id 10 for calling a global function with example usage: remove_all_log_handlers(logger) without return types