STYLE: fix pylint redefined-outer-name warnings
Fixed `redefined-outer-name` linting issue in the following files (Towards #49656)
- `pandas/util/_decorators.py`
- `pandas/util/_doctools.py`
- `pandas/util/_test_decorators.py`
@MarcoGorelli Addressed the requested changes in `_doctools.py`. Could you please review and let me know of any required changes? Thanks in advance! can you run the pre-commit checks? see the contributing guide for how > can you run the pre-commit checks? see the contributing guide for how

Will do. @MarcoGorelli I ran the pre-commit commands. The `utils/_doctools.py` had some changes which are now pushed. Let me know if there are any other needed changes. Glad I could help. Thanks for letting me contribute!