How to jump to source code from logs in output console?

For some logs printed by pytorch, I can click them and then jump to the source code, like the blue one. So how can I print something in my own code and get that feature?
Please sign in to leave a comment.