code: def visit_query_reference_node(self, node):
      """
      Resolve *node* into query strings on its ``reference`` children.
  
      Then act as if this is a `~docutils.nodes.literal`.
      """
      query = node.to_query_string()
      for refnode in node.findall(nodes.reference):
          uri = urlsplit(refnode["refuri"])._replace(query=query)
          refnode["refuri"] = urlunsplit(uri)
  
      self.visit_literal(node)
  
file_path: matplotlib/doc/sphinxext/custom_roles.py
imports: from urllib.parse import urlsplit, urlunsplit
  from docutils import nodes
  from matplotlib import rcParamsDefault
label_desc: Use image node_id 1 for calling a global function with example usage: visit_query_reference_node(node) without return types