Adding .py reference implementation