PR04 errors fix
- [x] closes #25105
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] get rid of the errors in the code base
- [x]  update the `code_check.sh` script to take into account the `PR04` type of errors