can a python method check if it has been called from within itself?,foo()