Given rst, parse and return a portion

def get_rst_excerpt(rst_doc: document, paragraphs: int = 1) -> str:
    """ Given rst, parse and return a portion """

    texts = []
    for count, p in enumerate(rst_doc.traverse(paragraph)):
        texts.append(p.astext())
        if count + 1 == paragraphs:
            break
    return ' '.join(texts)