code: def prepare_commentdoc(s: str) -> list[str]:
      """Extract documentation comment lines (starting with #:) and return them
      as a list of lines.  Returns an empty list if there is no documentation.
      """
      result = []
      lines = [line.strip() for line in s.expandtabs().splitlines()]
      for line in lines:
          if line.startswith("#:"):
              line = line[2:]
              # the first space after the comment is ignored
              if line and line[0] == " ":
                  line = line[1:]
              result.append(line)
      if result and result[-1]:
          result.append("")
      return result
  
imports: from __future__ import annotations
  import re
  import sys
  from docutils.parsers.rst.states import Body
label_desc: Use image node_id 3 for calling a global function with example usage: prepare_commentdoc(s) and returns: result