def strip_html_tags(text, allowed_tags=None):
if text is None:<EOL><INDENT>return<EOL><DEDENT>if allowed_tags is None:<EOL><INDENT>allowed_tags = ALLOWED_TAGS<EOL><DEDENT>return bleach.clean(text, tags=allowed_tags, attributes=['<STR_LIT:id>', '<STR_LIT:class>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:title>'], strip=True)<EOL>
Strip all tags from a string except those tags provided in `allowed_tags` parameter.

Args:
    text (str): string to strip html tags from
    allowed_tags (list): allowed list of html tags

Returns: a string without html tags