def safe_unicode(data):
    if isinstance(data, str):
        return data.decode('utf-8')
    else:
        return unicode(data)
Helper to safely convert <string's> that contain unicode to unicode.
dataset/ETHPy150Open box/rotunicode/rotunicode/utils.py/safe_unicode