predict1.py and other support and test code