def comment(value, comment_text):
    """Annotates a value or a Doc with a comment.

    When printed by prettyprinter, the comment will be
    rendered next to the value or Doc.
    """
    if isinstance(value, Doc):
        return comment_doc(value, comment_text)
    return comment_value(value, comment_text)
Annotates a value or a Doc with a comment.

    When printed by prettyprinter, the comment will be
    rendered next to the value or Doc.