<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bytes_to_unicode(s, encoding='utf-8', errors='replace'):
 """ Helper to convert byte string to unicode string for user based input :param str s: string to decode :param str encoding: utf-8 by default :param str errors: what to do when decoding fails :return: unicode utf-8 string """

    if compat.PY3:
        return str(s, 'utf-8') if isinstance(s, bytes) else s
    return s if isinstance(s, unicode) else s.decode(encoding, errors)