<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_text(s, encoding="utf-8"):
 """ Converts the bytes to a text type, if not already. :s: the bytes to convert to text :returns: `unicode` on Python2 and `str` on Python3. """

    if isinstance(s, six.text_type):
        return s
    else:
        return six.binary_type(s).decode(encoding)