CLN: Remove unnecessary io function returns
These functions return a function either with empty return statement or doesn’t return. It causes docstring validation error with type RT01 (See #26234).

- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
