dowhen is an instrumentation tool that allows you to change the function when you can't easily edit the source code. It has a super intuitive interface and a super low overhead.
Show HN: Run arbitrary code in 3rd party Python library with dowhen | Heykuki News