Given some RST, extract what docutils thinks is the title

def get_rst_title(rst_doc: Node) -> Optional[Any]:
    """ Given some RST, extract what docutils thinks is the title """

    for title in rst_doc.traverse(nodes.title):
        return title.astext()

    return None