code: def byte_adaptor(fbuffer):
      
      if six.PY3:
          strings = fbuffer.read().decode('latin-1')
          fbuffer = six.StringIO(strings)
          return fbuffer
      else:
          return fbuffer
docs: provides py3 compatibility by converting byte based
      file stream to string based file stream
  
      Arguments:
          fbuffer: file like objects containing bytes
  
      Returns:
          string buffer