def _valid_encoding(text):
    if not text:
        return
    if sys.version_info > (3,):
        return text
    else:
        return unicode(text).encode('utf-8')
dataset/ETHPy150Open srob650/pytvmaze/pytvmaze/tvmaze.py/_valid_encoding/original