move test code to sandbox and fixed foo.py example