def _fix_key(key):
        '''Normalize keys to Unicode strings.'''
        if isinstance(key, unicode):
            return key
        if isinstance(key, str):
            # On my system, the default encoding is `ascii`, so let's
            # explicitly say UTF-8?
            return unicode(key, 'utf-8')
        raise TypeError(key)
def _fix_key ( key ) : if isinstance ( key , unicode ) : return key if isinstance ( key , str ) : return unicode ( key , 'utf-8' ) raise TypeError ( key )
Normalize keys to Unicode strings.