Get the maximum number of frames stored in the traceback of a trace. By default, a trace of an allocated memory block only stores the most recent frame: the limit is 1.
tracemalloc/get_traceback_limit
get_traceback_limit