code: def _toctree_url_entry(title: str, ref: str) -> nodes.bullet_list:
      if title is None:
          title = ref
      reference = nodes.reference(
          "",
          "",
          internal=False,
          refuri=ref,
          anchorname="",
          *[nodes.Text(title)],
      )
      para = addnodes.compact_paragraph("", "", reference)
      item = nodes.list_item("", para)
      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 7 for calling a global function with example usage: _toctree_url_entry(title, ref) and returns: toc