BUG: StringIO fail import for asv benchmarks
- [x] closes N/A
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Fix StringIO import after #25954 PR