def _ensure_unicode(text):
 if isinstance(text, bytes):
  text = text.decode(u'utf-8')
 return text

def _ensure_unicode ( text ) : if isinstance ( text , bytes ) : text = text . decode ( u'utf-8' ) return text
return a unicode object for the given text .