code: def _filter_traceback_frames(
      tb, filter_funcs: Sequence[Callable[[types.CodeType], bool]]
  ):
      orig = tb
      filtered_at_least_one = False
      temp_all_frames = []
      filtered_frames = []
  
      while tb is not None:
          frame_code = tb.tb_frame.f_code
          should_remove = any(
              filter_func(frame_code) for filter_func in filter_funcs
          )
          if not should_remove:
              filtered_at_least_one = True
              filtered_frames.append(tb)
          temp_all_frames.append(tb)
          tb = tb.tb_next
  
      if not filtered_at_least_one:
          return orig
  
      def _append_frame(tb, next_tb_frame):
          return types.TracebackType(
              tb,
              next_tb_frame.tb_frame,
              next_tb_frame.tb_lasti,
              next_tb_frame.tb_lineno,
          )
  
      new_tb = functools.reduce(
          _append_frame, reversed(filtered_frames)
      )
  
      return new_tb
  
imports: import ctypes
  import functools
  import os
  import re
  import sys
  import types
  from typing import Callable, Sequence, Optional
  import numpy
  from .None import libinfo
label_desc: Use image node_id 12 for calling a global function with example usage: _filter_traceback_frames(tb, filter_funcs) and returns: new_tb, orig, types