code: def extract_relevant_tb(tb, exctype, is_test_failure):
      
      # Skip test runner traceback levels:
      while tb and _is_unittest_frame(tb):
          tb = tb.tb_next
      if is_test_failure:
          # Skip assert*() traceback levels:
          length = _count_relevant_tb_levels(tb)
          return extract_tb(tb, length)
      return extract_tb(tb)
docs: Return extracted traceback frame 4-tuples that aren't unittest ones.
  
      This used to be _exc_info_to_string().