new python script for closure tests - work in progress