MSP - Python implementation