class_docstr: A generic cross-referencing role.  To create a callable that can be used as
  a role function, create an instance of this class.
  
  The general features of this role are:
  
  * Automatic creation of a reference and a content node.
  * Optional separation of title and target with `title <target>`.
  * The implementation is a class rather than a function to make
    customization easier.
  
  Customization can be done in two ways:
  
  * Supplying constructor parameters:
    * `fix_parens` to normalize parentheses (strip from target, and add to
      title if configured)
    * `lowercase` to lowercase the target
    * `nodeclass` and `innernodeclass` select the node classes for
      the reference and the content node
  
  * Subclassing and overwriting `process_link()` and/or `result_nodes()`.
class_docstr_tok: ["A","generic","cross-referencing","role",".","To","create","a","callable","that","can","be","used","as","a","role","function",",","create","an","instance","of","this","class",".","The","general","features","of","this","role","are",":","*","Automatic","creation","of","a","reference","and","a","content","node",".","*","Optional","separation","of","title","and","target","with","`","title","<","target",">","`",".","*","The","implementation","is","a","class","rather","than","a","function","to","make","customization","easier",".","Customization","can","be","done","in","two","ways",":","*","Supplying","constructor","parameters",":","*","`","fix_parens","`","to","normalize","parentheses","(","strip","from","target",",","and","add","to","title","if","configured",")","*","`","lowercase","`","to","lowercase","the","target","*","`","nodeclass","`","and","`","innernodeclass","`","select","the","node","classes","for","the","reference","and","the","content","node","*","Subclassing","and","overwriting","`","process_link","(",")","`","and\/or","`","result_nodes","(",")","`","."]
code: def create_xref_node(self) -> tuple[list[Node], list[system_message]]:
      target = self.target
      title = self.title
      if self.lowercase:
          target = target.lower()
      if self.fix_parens:
          title, target = self.update_title_and_target(title, target)
  
      # create the reference node
      options = {
          "refdoc": self.env.docname,
          "refdomain": self.refdomain,
          "reftype": self.reftype,
          "refexplicit": self.has_explicit_title,
          "refwarn": self.warn_dangling,
      }
      refnode = self.nodeclass(self.rawtext, **options)
      self.set_source_info(refnode)
  
      # determine the target and title for the class
      title, target = self.process_link(
          self.env, refnode, self.has_explicit_title, title, target
      )
      refnode["reftarget"] = target
      refnode += self.innernodeclass(
          self.rawtext, title, classes=self.classes
      )
  
      return self.result_nodes(
          self.inliner.document, self.env, refnode, is_ref=True
      )
  
imports: from __future__ import annotations
  import re
  from typing import TYPE_CHECKING, Any
  import docutils.parsers.rst.directives
  import docutils.parsers.rst.roles
  import docutils.parsers.rst.states
  from docutils import nodes, utils
  from sphinx import addnodes
  from sphinx.locale import _, __
  from sphinx.util import ws_re
  from sphinx.util.docutils import ReferenceRole, SphinxRole
label_desc: Use image node_id 5 for calling the XRefRole obj's underlying member method code with example usage: obj.create_xref_node() and returns: self