how to define free-variable in python?,foo()