Excellent point Japreet.
This is more of a concept piece to understand the fundamentals.
Thanks for the idea, though, perhaps in a future post I'll combine with some code.
E.g, although not exactly what you are asking for but in another conceptual post https://bit.ly/simpsons-paradox-tds
I provide a link to a pythonic interactive demo to understand Simpson's Paradox by playing with data. I admit that even though you can go into my github repo, it's not reader friendly just yet.
If there is demand I can create a post with useful snippets of code.
In terms of actual real life setting applicability, however, your best bet is to go through tutorials of `dowhy` or other products that I mention in the Resources section of this post.