This is a code I had done for a graduation thesis based on the Phd of my mentor: https://dis.ijs.si/hristijan/?page_id=192
It is meant to demonstrate the method of Context-based ensambles, which was developed in the Phd thesis using the Python programming language.