test the Python Reference implementation