code: def merge_source_suffix(app: Sphinx, config: Config) -> None:
      """Merge any user-specified source_suffix with any added by extensions."""
      for suffix, filetype in app.registry.source_suffix.items():
          if suffix not in app.config.source_suffix:  # NoQA: SIM114
              app.config.source_suffix[suffix] = filetype
          elif app.config.source_suffix[suffix] is None:
              # filetype is not specified (default filetype).
              # So it overrides default filetype by extensions setting.
              app.config.source_suffix[suffix] = filetype
  
      # copy config.source_suffix to registry
      app.registry.source_suffix = app.config.source_suffix
  
imports: from __future__ import annotations
  import sys
  import traceback
  from importlib import import_module
  from types import MethodType
  from typing import TYPE_CHECKING, Any, Callable
  from sphinx.domains import Domain, Index, ObjType
  from sphinx.domains.std import GenericObject, Target
  from sphinx.errors import ExtensionError, SphinxError, VersionRequirementError
  from sphinx.extension import Extension
  from sphinx.io import create_publisher
  from sphinx.locale import __
  from sphinx.parsers import Parser
  from sphinx.roles import XRefRole
  from sphinx.util import logging
  from sphinx.util.logging import prefixed_warnings
label_desc: Use image node_id 1 for calling a global function with example usage: merge_source_suffix(app, config) without return types