code: def html_page_context(app, pagename, templatename, context, doctree):
      if templatename != "page.html":
          return
  
      if not app.config.edit_on_github_project:
          warnings.warn("edit_on_github_project not specified")
          return
      if not doctree:
          warnings.warn("doctree is None")
          return
      path = os.path.relpath(doctree.get("source"), app.builder.srcdir)
      show_url = get_github_url(app, "blob", path)
      edit_url = get_github_url(app, "edit", path)
  
      context["show_on_github_url"] = show_url
      context["edit_on_github_url"] = edit_url
  
imports: import os
  import warnings
label_desc: Use image node_id 2 for calling a global function with example usage: html_page_context(app, pagename, templatename, context, doctree) without return types