def soup(self):
components_soup = Tag(name=self.tagname, builder=BUILDER)<EOL>components_soup.attrs = self.attributes<EOL>for c in flatten(self.components):<EOL><INDENT>if hasattr(c, '<STR_LIT>'):<EOL><INDENT>components_soup.append(c.soup())<EOL><DEDENT>elif type(c) in (str, ):<EOL><INDENT>components_soup.append(str(c))<EOL><DEDENT><DEDENT>return components_soup<EOL>
Returns HTML as a BeautifulSoup element.