# 1
import inspect
def fun1():
name = inspect.stack()[1][3]
print ('%s Invoked me!'%name)
def a():
fun1()
a()
# 2
import traceback
def fun2():
name = traceback.extract_stack()[-2][2]
print ('%s Invoked me!'%name)
def b():
fun2()
b()