OpenLR implementation in Python