class_docstr: Render a layout.Doc object
class_docstr_tok: ["Render","a","layout.Doc","object"]
docstr: Create codes used for doc labels
  
  Given the label names, it returns a Code object that
  creates the following HTML
  <span class="doc-labels">
      <code class="doc-label doc-label-name1"></code>
      <code class="doc-label doc-label-name2"></code>
  </span>
docstr_tok: ["Create","codes","used","for","doc","labels","Given","the","label","names",",","it","returns","a","Code","object","that","creates","the","following","HTML","<","span","class=","''","doc-labels","''",">","<","code","class=","''","doc-label","doc-label-name1","''",">","<","\/code",">","<","code","class=","''","doc-label","doc-label-name2","''",">","<","\/code",">","<","\/span",">"]
code: def render_labels(self) -> Span | Literal[""]:
      """
      Create codes used for doc labels
  
      Given the label names, it returns a Code object that
      creates the following HTML
      <span class="doc-labels">
          <code class="doc-label doc-label-name1"></code>
          <code class="doc-label doc-label-name2"></code>
      </span>
      """
      if not self.labels:
          return ""
  
      codes = [
          Code(
              " ", Attr(classes=["doc-label", f"doc-label-{l.lower()}"])
          )
          for l in self.labels
      ]
      return Span(codes, Attr(classes=["doc-labels"]))
  
imports: from __future__ import annotations
  from dataclasses import dataclass
  from functools import cached_property, singledispatchmethod
  from typing import TYPE_CHECKING, cast
  import griffe.expressions
  from griffe import dataclasses
  from griffe.docstrings import dataclasses
  from quartodoc import ast
  from quartodoc import layout
  from quartodoc.pandoc.blocks import Block, BlockContent, Blocks, CodeBlock, Div, Header
  from quartodoc.pandoc.components import Attr
  from quartodoc.pandoc.inlines import Code, Inline, Inlines, Link, Span
  from ..format import markdown_escape, pretty_code, repr_obj
  from ..typing import DocObjectKind
  from ..utils import InterLink, is_protocol, is_typealias, is_typevar, no_init
  from .base import RenderBase
label_desc: Use image node_id 8 for calling the __RenderDoc obj's underlying member method code with example usage: obj.render_labels() and returns: Span, str