docs: def from_utf8(buf, errors='replace'):
      """ Decodes a UTF-8 compatible, ASCII string into a unicode object.
  
          `buf`
              string or unicode string to convert.
  
          Returns unicode` string.
  
          * Raises a ``UnicodeDecodeError`` exception if encoding failed and
            `errors` isn't set to 'replace'.
          """
  
      if isinstance(buf, unicode):
          return buf
  
      else:
          return unicode(buf, 'utf-8', errors)