Do we have a python3, pythonic way to print out function invoked during a python execution? For example, I run a main function on a third-party, relatively large library. I need to print out all functions called. Eventually, I hope to remove code that is irrelevant to a specific execution of code. I know from Is there a tool that removes functions that are not used in Python? that this was difficult in general years ago.
There may be good answer at How do I print functions as they are called, but maybe outdated for python3?