code: def on_doctree_resolved(app, doctree, docname):
      """Replace URLQueryParamRefNode instances with real references.
  
      Args:
          app: Sphinx application
          doctree: Doctree which has just been resolved
          docname: Name of the document containing the reference nodes
      """
      for node in doctree.traverse(URLQueryParamRefNode):
          content = node.rawsource["refexplicit"]
  
          ref_node = nodes.reference(content, content)
  
          # Pass all URLQueryParamRefNode attributes to ref node;
          # possibly not necessary
          for key, value in node.rawsource.items():
              ref_node[key] = value
  
          # Need to update refuri of ref node to include URL query parameters
          ref_node["refuri"] = (
              app.builder.get_relative_uri(
                  docname,
                  node.rawsource["reftarget"],
              )
              + node.rawsource["parameters"]
          )
  
          # Need to wrap the node in a paragraph for Sphinx to build
          wrapper = WrapperNode()
          wrapper["class"] = "query-param-ref-wrapper"
          wrapper += ref_node
          node.replace_self([wrapper])
  
file_path: ray/doc/source/_ext/queryparamrefs.py
imports: from docutils import nodes
  from docutils.parsers.rst import directives
  from sphinx.util.docutils import SphinxDirective
label_desc: Use image node_id 1 for calling a global function with example usage: on_doctree_resolved(app, doctree, docname) without return types