You can find here:
- The python script implementing the required algebraic structures: KD.py
- A small tutorial deomnstrating how it works