def METHOD_NAME():
    frame1 = Mock(f_lineno=111, f_code=Mock(co_name='CO_NAME1', co_filename='CO_FILENAME1'))
    frame2 = Mock(f_lineno=222, f_code=Mock(co_name='CO_NAME2', co_filename='CO_FILENAME2'))
    start_time_1 = time.time() - 2
    start_time_2 = time.time() - 1
    stack = [(frame1, start_time_1), (frame2, start_time_2)]
    prev_switch_interval = sys.getswitchinterval()
    test_switch_interval = 10.0
    assert prev_switch_interval != pytest.approx(test_switch_interval, abs=0.01)
    sys.setswitchinterval(test_switch_interval)
    with patch('tribler.core.utilities.slow_coro_detection.main_thread_stack_tracking._main_thread_stack', stack):
        stack_info = _get_main_thread_stack_info()
    assert stack_info == [StackFrameInfo(func_name='CO_NAME1', file_name='CO_FILENAME1', line_number=111,
                                         start_time=start_time_1, is_under_profiling=False),
                          StackFrameInfo(func_name='CO_NAME2', file_name='CO_FILENAME2', line_number=222,
                                         start_time=start_time_2, is_under_profiling=False)]
    assert sys.getswitchinterval() == pytest.approx(test_switch_interval, abs=0.01)
    sys.setswitchinterval(prev_switch_interval)