is it possible to create a dynamic localized scope in python?,foo()