When working in pycharm with transformers as an External Library, I couldn’t get this to work (i.e. when I want to read the source code for a specific method from an external library managed by pip or conda).
But the following fixed it:
(pycharm) preferences >  file types > ignore files and folders > add “;dummy_*.py;”