def METHOD_NAME(
    self, soup: BeautifulSoup, template: dict[str, BeautifulSoup]
) -> None:
    """Applies the given mapping template to the given soup."""
    for css_sel, replace in template.items():
        mapped = soup.select(css_sel)
        if not mapped:
            self.logger.warning(
                f'Could not find "{css_sel}", can not freeze anything.'
            )
        else:
            self.replace(
                soup,
                css_sel,
                BeautifulSoup(replace, features=MappingAddonConfig.HTML_PARSER),
            )