Clears the local variables of all the stack frames in a traceback tb by calling the clear() method of each frame object.
traceback.clear_frames(tb)