Use StringIO and BytesIO from io module [applied]