code: def add_source_parser(
      self, parser: type[Parser], override: bool = False
  ) -> None:
      logger.debug("[app] adding search source_parser: %r", parser)
  
      # create a map from filetype to parser
      for filetype in parser.supported:
          if filetype in self.source_parsers and not override:
              raise ExtensionError(
                  __("source_parser for %r is already registered")
                  % filetype
              )
          self.source_parsers[filetype] = parser
  
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 14 for calling the SphinxComponentRegistry obj's underlying member method code with example usage: obj.add_source_parser(parser, override) without return types