class_docstr: Contains logic for updating one node with the translated content.
class_docstr_tok: ["Contains","logic","for","updating","one","node","with","the","translated","content","."]
code: def update_pending_xrefs(self) -> None:
      # Original pending_xref['reftarget'] contain not-translated
      # target name, new pending_xref must use original one.
      # This code restricts to change ref-targets in the translation.
      old_xrefs = [*self.node.findall(addnodes.pending_xref)]
      new_xrefs = [*self.patch.findall(addnodes.pending_xref)]
      self.compare_references(
          old_xrefs,
          new_xrefs,
          __(
              "inconsistent term references in translated message."
              + " original: {0}, translated: {1}"
          ),
      )
  
      xref_reftarget_map: dict[
          tuple[str, str, str] | None, dict[str, Any]
      ] = {}
  
      def get_ref_key(
          node: addnodes.pending_xref,
      ) -> tuple[str, str, str] | None:
          case = node["refdomain"], node["reftype"]
          if case == ("std", "term"):
              return None
          else:
              return (
                  node["refdomain"],
                  node["reftype"],
                  node["reftarget"],
              )
  
      for old in old_xrefs:
          key = get_ref_key(old)
          if key:
              xref_reftarget_map[key] = old.attributes
      for new in new_xrefs:
          key = get_ref_key(new)
          # Copy attributes to keep original node behavior. Especially
          # copying 'reftarget', 'py:module', 'py:class' are needed.
          for k, v in xref_reftarget_map.get(key, {}).items():
              if k not in EXCLUDED_PENDING_XREF_ATTRIBUTES:
                  new[k] = v
  
imports: from __future__ import annotations
  import contextlib
  from os import path
  from re import DOTALL, match
  from textwrap import indent
  from typing import TYPE_CHECKING, Any, TypeVar
  from docutils import nodes
  from docutils.io import StringInput
  from sphinx import addnodes
  from sphinx.domains.std import make_glossary_term, split_term_classifiers
  from sphinx.errors import ConfigError
  from sphinx.locale import __
  from sphinx.locale import init
  from sphinx.transforms import SphinxTransform
  from sphinx.util import get_filetype, logging
  from sphinx.util.i18n import docname_to_domain
  from sphinx.util.index_entries import split_index_msg
  from sphinx.util.nodes import IMAGE_TYPE_NODES, LITERAL_TYPE_NODES, NodeMatcher, extract_messages, traverse_translatable_index
label_desc: Use image node_id 8 for calling the _NodeUpdater obj's underlying member method code with example usage: obj.update_pending_xrefs() and returns: None, node,  node,  node