bs4.BeautifulSoup.format_string

BeautifulSoup.format_string(s, formatter='minimal')

Format the given string using the given formatter.