DOC: Fixed implicit imports for whatsnew (v >= version 20.0)
- [x] xref #24177 
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
This partially resolves #24177 .