def pct_decode(s):
    """
    Return the percent-decoded version of string s.

    >>> pct_decode('%43%6F%75%63%6F%75%2C%20%6A%65%20%73%75%69%73%20%63%6F%6E%76%69%76%69%61%6C')
    'Coucou, je suis convivial'
    >>> pct_decode('')
    ''
    >>> pct_decode('%2525')
    '%25'
    """
    if s is None:
        return None
    elif not isinstance(s, unicode):
        s = str(s)
    else:
        s = s.encode('utf8')

    return PERCENT_CODE_SUB(lambda mo: chr(int(mo.group(0)[1:], 16)), s)
Return the percent-decoded version of string s.

    >>> pct_decode('%43%6F%75%63%6F%75%2C%20%6A%65%20%73%75%69%73%20%63%6F%6E%76%69%76%69%61%6C')
    'Coucou, je suis convivial'
    >>> pct_decode('')
    ''
    >>> pct_decode('%2525')
    '%25'