code: def _toctree_generated_entry(
      title: str, ref: str
  ) -> nodes.bullet_list:
      from sphinx.domains.std import StandardDomain
  
      docname, sectionname = StandardDomain._virtual_doc_names[ref]
      if not title:
          title = sectionname
      reference = nodes.reference(
          "", title, internal=True, refuri=docname, anchorname=""
      )
      para = addnodes.compact_paragraph("", "", reference)
      item = nodes.list_item("", para)
      # don't show subitems
      toc = nodes.bullet_list("", item)
      return toc
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any, TypeVar
  from docutils import nodes
  from docutils.nodes import Element, Node
  from sphinx import addnodes
  from sphinx.locale import __
  from sphinx.util import logging, url_re
  from sphinx.util.matching import Matcher
  from sphinx.util.nodes import _only_node_keep_children, clean_astext
label_desc: Use image node_id 9 for calling a global function with example usage: _toctree_generated_entry(title, ref) and returns: toc