Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
https://www.ianlewis.org/en/dynamically-adding-method-classes-or-class-instanc
http://block.arch.ethz.ch/blog/2016/07/adding-methods-to-python-classes/