Code reusability is something always we talk of, this article on creating stored procedures using embedded Python is a gift. Thank you @Yuri Marx