human
Complete the below
def initial_quotes(text):

    ''''Wraps initial quotes in ``class="dquo"`` for double quotes or
    ``class="quo"`` for single quotes. Works in these block tags ``(h1-h6, p, li, dt, dd)``
    and also accounts for potential opening inline elements ``a, em, strong, span, b, i``
    >>> initial_quotes(\'"With primes"\')
    u\'<span class="dquo">"</span>With primes"\'
    >>> initial_quotes("\'With single primes\'")
    u\'<span class="quo">\\'</span>With single primes\\'\'
    >>> initial_quotes(\'<a href="#">"With primes and a link"</a>\')
    u\'<a href="#"><span class="dquo">"</span>With primes and a link"</a>\'
    >>> initial_quotes(\'&#8220;With smartypanted quotes&#8221;\')
    u\'<span class="dquo">&#8220;</span>With smartypanted quotes&#8221;\''
    '''

=====
Give me a the Python code you requested?
assistant
#Here is the Python code you requested.
    text = force_unicode(text)
    quote_finder = re.compile('((<(p|h[1-6]|li|dt|dd)[^>]*>|^)                                                        #    start    with    an    opening    p,    h1-6,    li,    dd,    dt    or    the    start    of    the    string\n                                                                                                                                        \\s*                                                                                                                                                                        #    optional    white    space!    \n                                                                                                                                        (<(a|em|span|strong|i|b)[^>]*>\\s*)*)                                    #    optional    opening    inline    tags,    with    more    optional    white    space    for    each.\n                                                                                                                                        (("|&ldquo;|&\\#8220;)|(\'|&lsquo;|&\\#8216;))        #    Find    me    a    quote!    (only    need    to    find    the    left    quotes    and    the    primes)\n                                                                                                                                                                                                                                                                                                                            #    double    quotes    are    in    group    7,    singles    in    group    8    \n                                                                                                                                        ', re.VERBOSE)
    def _quote_wrapper(matchobj):
        if matchobj.group(7):
            classname = 'dquo'
            quote = matchobj.group(7)
        else:
            classname = 'quo'
            quote = matchobj.group(8)
        return ('%s<span   ...