code: def apply(self):
      env = self.document.settings.env
  
      for node in self.document.traverse(docutils.nodes.reference):
          refuri = node.get("refuri")
          parsed = urllib.parse.urlparse(refuri)
  
          if parsed.netloc == "" and parsed.path.endswith("README.md"):
              # the notebooks include links to READMEs so that the links work locally and on
              # GitHub, but on Read the Docs, the equivalent files are 'index', not 'README'.
              new_path = parsed.path.replace("README.md", "index.rst")
              new_components = (
                  parsed.scheme,
                  parsed.netloc,
                  new_path,
                  parsed.params,
                  parsed.query,
                  parsed.fragment,
              )
              node["refuri"] = urllib.parse.urlunparse(new_components)
  
          elif parsed.netloc == "stellargraph.readthedocs.io":
              self._rewrite_rtd_link(node, refuri, parsed)
  
file_path: stellargraph/docs/conf.py
imports: import urllib.parse
  import docutils
  import sphinx
  import os
  import sys
  import re
label_desc: Use image node_id 2 for calling the RewriteLinks obj's underlying member method code with example usage: obj.apply() without return types