class_docstr: For each external link, check if it can be replaced by an extlink.
  
  We treat each ``reference`` node without ``internal`` attribute as an external link.
docstr: If the URI in ``refnode`` has a replacement in ``extlinks``,
  emit a warning with a replacement suggestion.
docstr_tok: ["If","the","URI","in","``","refnode","``","has","a","replacement","in","``","extlinks","``",",","emit","a","warning","with","a","replacement","suggestion","."]
code: def check_uri(self, refnode: nodes.reference) -> None:
      """
      If the URI in ``refnode`` has a replacement in ``extlinks``,
      emit a warning with a replacement suggestion.
      """
      if "internal" in refnode or "refuri" not in refnode:
          return
  
      uri = refnode["refuri"]
      title = refnode.astext()
  
      for alias, (
          base_uri,
          _caption,
      ) in self.app.config.extlinks.items():
          uri_pattern = re.compile(
              re.escape(base_uri).replace("%s", "(?P<value>.+)")
          )
  
          match = uri_pattern.match(uri)
          if (
              match
              and match.groupdict().get("value")
              and "/" not in match.groupdict()["value"]
          ):
              # build a replacement suggestion
              msg = __(
                  "hardcoded link %r could be replaced by an extlink "
                  "(try using %r instead)"
              )
              value = match.groupdict().get("value")
              if uri != title:
                  replacement = (
                      f":{alias}:`{rst.escape(title)} <{value}>`"
                  )
              else:
                  replacement = f":{alias}:`{value}`"
              logger.warning(msg, uri, replacement, location=refnode)
  
file_path: sphinx/sphinx/ext/extlinks.py
imports: from __future__ import annotations
  import re
  from typing import TYPE_CHECKING, Any
  from docutils import nodes, utils
  import sphinx
  from sphinx.locale import __
  from sphinx.transforms.post_transforms import SphinxPostTransform
  from sphinx.util import logging, rst
  from sphinx.util.nodes import split_explicit_title
label_desc: Use image node_id 2 for calling the ExternalLinksChecker obj's underlying member method code with example usage: obj.check_uri(refnode) without return types