def METHOD_NAME(fragment: str) -> Doc:
    article = copy.copy(soup.find(id=fragment))
    txt0 = article.text.replace('\n\n', '\n').replace('\n\n', '\n')
    title, _, txt = txt0.split(' ', 1)[1].split('\n', 2)
    for i in range(2, 6):
        if h := article.find(f'h{i}'):
            h.decompose()
            break
    else:
        print("=====")
        print(article)
        raise AssertionError
    article.p.decompose()  # remove the instruction name
    return Doc(title.rstrip(''), txt, str(article))