code: def get_logging_console() -> Handler:
      """Returns a custom logging handler.
  
      Generally this is necessary when both logging output and a progress bar are both
      outputting to ``sys.stderr``.
  
      Note:
          This is a :ref:`firstresult hook<firstresult>`.
      """
  
imports: from __future__ import annotations
  from abc import ABC, abstractmethod
  from argparse import ArgumentParser, Namespace
  from collections.abc import Sequence, Set
  from logging import Handler
  from pathlib import Path
  from typing import TYPE_CHECKING, NamedTuple
  import pluggy
  from ocrmypdf import Executor, PdfContext
  from ocrmypdf._progressbar import ProgressBar
  from ocrmypdf.helpers import Resolution
label_desc: Use image node_id 1 for calling a global function with example usage: get_logging_console() without return types