class_docstr: Wraps a reference or pending reference to add a query string.
  
  The query string is generated from the attributes added to this node.
  
  Also equivalent to a `~docutils.nodes.literal` node.
docstr: Generate query string from node attributes.
code: def to_query_string(self):
      """Generate query string from node attributes."""
      return "&".join(
          f"{name}={value}" for name, value in self.attlist()
      )
  
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 the QueryReference obj's underlying member method code with example usage: obj.to_query_string() and returns: str