code: def setup(app):
      from sphinx.domains.python import PyField
      from sphinx.locale import _
      from sphinx.util.docfields import Field
  
      app.add_object_type(
          "confval",
          "confval",
          objname="configuration value",
          indextemplate="pair: %s; configuration value",
          doc_field_types=[
              PyField(
                  "type",
                  label=_("Type"),
                  has_arg=False,
                  names=("type",),
                  bodyrolename="class",
              ),
              Field(
                  "default",
                  label=_("Default"),
                  has_arg=False,
                  names=("default",),
              ),
          ],
      )
  
imports: import os
  import re
  import sys
  from os import path
label_desc: Use image node_id 1 for calling a global function with example usage: setup(app) without return types