code: def init_numfig_format(app: Sphinx, config: Config) -> None:
      """Initialize :confval:`numfig_format`."""
      numfig_format = {
          "section": _("Section %s"),
          "figure": _("Fig. %s"),
          "table": _("Table %s"),
          "code-block": _("Listing %s"),
      }
  
      # override default labels by configuration
      numfig_format.update(config.numfig_format)
      config.numfig_format = numfig_format
  
imports: from __future__ import annotations
  import sys
  import time
  import traceback
  import types
  import warnings
  from os import getenv, path
  from typing import TYPE_CHECKING, Any, Literal, NamedTuple, Union
  from sphinx.deprecation import RemovedInSphinx90Warning
  from sphinx.errors import ConfigError, ExtensionError
  from sphinx.locale import _, __
  from sphinx.util import logging
  from sphinx.util.osutil import fs_encoding
  from sphinx.util.typing import NoneType
label_desc: Use image node_id 6 for calling a global function with example usage: init_numfig_format(app, config) without return types