DOC: Fix flake8 problems in io.rst
- [x] closes #23791
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Pushing this code to check if this clears CI. Made a few changes towards issue #23791 