code: def to_str(s, encoding=None, errors='strict'):
      
      encoding = encoding or 'utf-8'
  
      if is_strlike(s):
          if six.PY2:
              return s.encode(encoding, errors) if isinstance(s, unicode) else s
          else:
              return s.decode(encoding, errors) if isinstance(s, bytes) else s
      else:
          return str(s)
docs: Make str from any value
      :param s:
      :param encoding:
      :param errors:
      :return: str (not unicode in Python2, nor bytes in Python3)