code: def add_class_def(node, classDef):
      """Add reference on classDef to node"""
  
      ref = addnodes.pending_xref(
          reftarget=classDef,
          reftype="class",
          refdomain="py",  # py:class="None" py:module="altair" refdoc="user_guide/marks"
          refexplicit=False,
          # refdoc="",
          refwarn=False,
      )
      ref["py:class"] = "None"
      ref["py:module"] = "altair"
  
      ref += nodes.literal(
          text=classDef, classes=["xref", "py", "py-class"]
      )
      node += ref
      return node
  
imports: import importlib
  import re
  import sys
  import warnings
  from os.path import abspath, dirname
  from docutils import nodes, utils, frontend
  from docutils.parsers.rst import Directive
  from docutils.parsers.rst.directives import flag
  from myst_parser.docutils_ import Parser
  from sphinx import addnodes
  from tools.schemapi.utils import fix_docstring_issues, SchemaInfo
label_desc: Use image node_id 3 for calling a global function with example usage: add_class_def(node, classDef) and returns: node