code: def _process_traceback_frames(tb):
      """Iterate through traceback frames and return a new, filtered traceback."""
      last_tb = None
      tb_list = list(traceback.walk_tb(tb))
      for f, line_no in reversed(tb_list):
          if include_frame(f.f_code.co_filename):
              last_tb = types.TracebackType(
                  last_tb, f, f.f_lasti, line_no
              )
      if last_tb is None and tb_list:
          # If no frames were kept during filtering, create a new traceback
          # from the outermost function.
          f, line_no = tb_list[-1]
          last_tb = types.TracebackType(last_tb, f, f.f_lasti, line_no)
      return last_tb
  
file_path: keras/keras/utils/traceback_utils.py
imports: import inspect
  import os
  import traceback
  import types
  from functools import wraps
  import tree
  from keras import backend
  from keras.api_export import keras_export
  from keras.backend.common import global_state
label_desc: Use image node_id 5 for calling a global function with example usage: _process_traceback_frames(tb) and returns: last_tb