'Cleans <code> tags from html. Should only be used in \'code" section to prevent
<code> tags from doubling up within the <pre><code> section
:param code_html_to_clean: String of html to remove code tags
:return: html with removed code tags'

def _clean_code_tags(self, code_html_to_clean):

    html_soup_cleaner = BeautifulSoup(code_html_to_clean, 'html.parser')
    for tag in html_soup_cleaner.find_all('code'):
        if tag.attrs:
            del tag.attrs
        del tag.name
    for tag in html_soup_cleaner.find_all('table'):
        if tag.attrs:
            del tag.name
            del tag.attrs
        if tag.ul:
            tag.contents = tag.ul.contents
            tmp_tag = html_soup_cleaner.new_tag('span')
            tmp_tag.attrs = {'class': 'prog__sub'}
            tmp_tag.string = 'Parameters'
            tag.insert(0, tmp_tag)
    cleaned_html = str(html_soup_cleaner)
    cleaned_html = cleaned_html.replace('<None>', '')
    cleaned_html = cleaned_html.replace('</None>', '')
    cleaned_html = cleaned_html.replace('<none>', '')
    cleaned_html = cleaned_html.replace('</none>', '')
    while ('<p></p>' in cleaned_html):
        cleaned_html = cleaned_html.replace('<p></p>', '')
    cleaned_html = cleaned_html.strip()
    return cleaned_html
