class_docstr: Resolve certain links in markdown files to github source.
code: def resolve_any_xref(
      self, env, fromdocname, builder, target, node, contnode
  ):
      github_url = None
      if not target.endswith("html") and target.startswith("../../"):
          url = target.replace("../", "")
          github_url = url
      if fromdocname in self.LINKED_DOC:
          # unresolved links in these docs are all github links
          github_url = target
  
      if github_url is not None:
          if github_url.endswith("MODEL_ZOO") or github_url.endswith(
              "README"
          ):
              # bug of recommonmark.
              # https://github.com/readthedocs/recommonmark/blob/ddd56e7717e9745f11300059e4268e204138a6b1/recommonmark/parser.py#L152-L155
              github_url += ".md"
          print(
              "Ref {} resolved to github:{}".format(target, github_url)
          )
          contnode["refuri"] = self.ROOT + github_url
          return [("githuburl:any", contnode)]
      else:
          return []
  
file_path: detectron2/docs/conf.py
imports: import os
  import sys
  from unittest import mock
  from sphinx.domains import Domain
  from typing import Dict, List, Tuple
  import sphinx_rtd_theme
  from recommonmark.parser import CommonMarkParser
  import detectron2
label_desc: Use image node_id 1 for calling the GithubURLDomain obj's underlying member method code with example usage: obj.resolve_any_xref(env, fromdocname, builder, target, node, contnode) and returns: list, list