TYP: handle mypy ignore in pandas/_testing
- [ ] xref #37715
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Handle mypy ignore comments in ``pandas/_testing.py``, function ``write_to_compressed``.