class_docstr: A Domain is meant to be a group of "object" description directives for
  objects of a similar nature, and corresponding roles to create references to
  them.  Examples would be Python modules, classes, functions etc., elements
  of a templating language, Sphinx roles and directives, etc.
  
  Each domain has a separate storage for information about existing objects
  and how to reference them in `self.data`, which must be a dictionary.  It
  also must implement several functions that expose the object information in
  a uniform way to parts of Sphinx that allow the user to reference or search
  for objects in a domain-agnostic way.
  
  About `self.data`: since all object and cross-referencing information is
  stored on a BuildEnvironment instance, the `domain.data` object is also
  stored in the `env.domaindata` dict under the key `domain.name`.  Before the
  build process starts, every active domain is instantiated and given the
  environment object; the `domaindata` dict must then either be nonexistent or
  a dictionary whose 'version' key is equal to the domain class'
  :attr:`data_version` attribute.  Otherwise, `OSError` is raised and the
  pickled environment is discarded.
class_docstr_tok: ["A","Domain","is","meant","to","be","a","group","of","``","object","''","description","directives","for","objects","of","a","similar","nature",",","and","corresponding","roles","to","create","references","to","them",".","Examples","would","be","Python","modules",",","classes",",","functions","etc.",",","elements","of","a","templating","language",",","Sphinx","roles","and","directives",",","etc",".","Each","domain","has","a","separate","storage","for","information","about","existing","objects","and","how","to","reference","them","in","`","self.data","`",",","which","must","be","a","dictionary",".","It","also","must","implement","several","functions","that","expose","the","object","information","in","a","uniform","way","to","parts","of","Sphinx","that","allow","the","user","to","reference","or","search","for","objects","in","a","domain-agnostic","way",".","About","`","self.data","`",":","since","all","object","and","cross-referencing","information","is","stored","on","a","BuildEnvironment","instance",",","the","`","domain.data","`","object","is","also","stored","in","the","`","env.domaindata","`","dict","under","the","key","`","domain.name","`",".","Before","the","build","process","starts",",","every","active","domain","is","instantiated","and","given","the","environment","object",";","the","`","domaindata","`","dict","must","then","either","be","nonexistent","or","a","dictionary","whose","'version","'","key","is","equal","to","the","domain","class'",":","attr",":","`","data_version","`","attribute",".","Otherwise",",","`","OSError","`","is","raised","and","the","pickled","environment","is","discarded","."]
docstr: Resolve the pending_xref *node* with the given *typ* and *target*.
  
  This method should return a new node, to replace the xref node,
  containing the *contnode* which is the markup content of the
  cross-reference.
  
  If no resolution can be found, None can be returned; the xref node will
  then given to the :event:`missing-reference` event, and if that yields no
  resolution, replaced by *contnode*.
  
  The method can also raise :exc:`sphinx.environment.NoUri` to suppress
  the :event:`missing-reference` event being emitted.
docstr_tok: ["Resolve","the","pending_xref","*","node","*","with","the","given","*","typ","*","and","*","target","*",".","This","method","should","return","a","new","node",",","to","replace","the","xref","node",",","containing","the","*","contnode","*","which","is","the","markup","content","of","the","cross-reference",".","If","no","resolution","can","be","found",",","None","can","be","returned",";","the","xref","node","will","then","given","to","the",":","event",":","`","missing-reference","`","event",",","and","if","that","yields","no","resolution",",","replaced","by","*","contnode","*",".","The","method","can","also","raise",":","exc",":","`","sphinx.environment.NoUri","`","to","suppress","the",":","event",":","`","missing-reference","`","event","being","emitted","."]
code: def resolve_xref(
      self,
      env: BuildEnvironment,
      fromdocname: str,
      builder: Builder,
      typ: str,
      target: str,
      node: pending_xref,
      contnode: Element,
  ) -> Element | None:
      """Resolve the pending_xref *node* with the given *typ* and *target*.
  
      This method should return a new node, to replace the xref node,
      containing the *contnode* which is the markup content of the
      cross-reference.
  
      If no resolution can be found, None can be returned; the xref node will
      then given to the :event:`missing-reference` event, and if that yields no
      resolution, replaced by *contnode*.
  
      The method can also raise :exc:`sphinx.environment.NoUri` to suppress
      the :event:`missing-reference` event being emitted.
      """
      pass
  
imports: from __future__ import annotations
  import copy
  from abc import ABC, abstractmethod
  from typing import TYPE_CHECKING, Any, Callable, NamedTuple, Optional, cast
  from docutils.nodes import Element, Node, system_message
  from sphinx.errors import SphinxError
  from sphinx.locale import _
label_desc: Use image node_id 11 for calling the Domain obj's underlying member method code with example usage: obj.resolve_xref(env, fromdocname, builder, typ, target, node, contnode) without return types