code: def add_version_doc(f, version):
      """
      Annotates a function to append the version the function was added.
      """
  
      import re
  
      indent_p = re.compile(r"\n( *)[^\n ]")
  
      original_doc = f.__doc__ or ""
      indents = indent_p.findall(original_doc)
      indent = " " * (
          min(len(indent) for indent in indents) if indents else 0
      )
      f.__doc__ = (
          original_doc.rstrip()
          + "\n\n%s.. versionadded:: %s" % (indent, version)
      )
  
label_desc: Use image node_id 2 for calling a global function with example usage: add_version_doc(f, version) without return types