I'm not sure why we use the outdated `StringIO` module instead of `io.BytesIO`