def METHOD_NAME(self):
    # In some cases, we use different NavigableString subclasses for
    # the same text in different tags.
    soup = self.soup(
        "<div>text</div><script>text</script><style>text</style>"
    )
    assert [NavigableString, Script, Stylesheet] == [
        x.__class__ for x in soup.find_all(string=True)
    ]
    # The TemplateString is a little unusual because it's generally found
    # _inside_ children of a <template> element, not a direct child of the
    # <template> element.
    soup = self.soup(
        "<template>Some text<p>In a tag</p></template>Some text outside"
    )
    assert all(
        isinstance(x, TemplateString)
        for x in soup.template._all_strings(types=None)
    )
    # Once the <template> tag closed, we went back to using
    # NavigableString.
    outside = soup.template.next_sibling
    assert isinstance(outside, NavigableString)
    assert not isinstance(outside, TemplateString)
    # The TemplateString is also unusual because it can contain
    # NavigableString subclasses of _other_ types, such as
    # Comment.
    markup = b"<template>Some text<p>In a tag</p><!--with a comment--></template>"
    soup = self.soup(markup)
    assert markup == soup.template.encode("utf8")