from typing import List
from bs4 import BeautifulSoup


def _remove_tags_and_disallowed_bodies(
        text: str, disallowed_bodies_tags: List[str]) -> str:
    """Return a cleaned version of the text without any HTML tags and stripped
    of the text in the bodies of the disallowed tags.
    """
    soup = BeautifulSoup(text, 'html.parser')
    for tag in soup.find_all(disallowed_bodies_tags):
        tag.decompose()
    return soup.get_text()