def to_text(value, encoding='<STR_LIT:utf-8>'):
if not value:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>if isinstance(value, six.text_type):<EOL><INDENT>return value<EOL><DEDENT>if isinstance(value, six.binary_type):<EOL><INDENT>return value.decode(encoding)<EOL><DEDENT>return six.text_type(value)<EOL>
Convert value to unicode, default encoding is utf-8

    :param value: Value to be converted
    :param encoding: Desired encoding