from bs4 import BeautifulSoup


def add_blockquote_class(soup_body: object) -> object:
    """For each blockquote in the input bs4 object, change the class to 'blockquote text-muted' so that the bootstrap
    framework blockquote styling will be applied.

    Args:
        soup_body: bs4 object input

    Returns:
        modified bs4 object
    """
    if not isinstance(soup_body, BeautifulSoup):
        raise TypeError('Input must be a bs4.BeautifulSoup object')

    for bq in soup_body.find_all('blockquote'):
        bq['class'] = 'blockquote'

        for p in bq.find_all('p'):
            for dash in ['-- ', '--- ', '– ', '— ', '&ndash; ', '&mdash; ']:
                if p.string[:len(dash)] == dash:
                    bqf = soup_body.new_tag('footer')
                    bqf['class'] = 'blockquote-footer'
                    bqf.string = p.string.replace(dash, '')
                    p.replace_with(bqf)

    return soup_body