Return a list of FrameInfo objects for the caller’s stack. The first entry in the returned list represents the caller; the last entry represents the outermost call on the stack.
inspect.stack(context=1)