def METHOD_NAME(tb):
    """
    Originally from: https://fman.io/blog/pyqt-excepthook/
    When an exception occurs in Python, sys.excepthook(...) is called with an
    exc_tb parameter. This parameter contains the information for each of the
    lines in the Tracebacks shown above. The reason why the first version of
    our code did not include f() in the traceback was that it did not appear
    in exc_tb.
    To fix the problem, our additional excepthook code above creates a "fake"
    traceback that includes the missing entries. Fortunately, the necessary
    information is available in the .tb_frame property of the original
    traceback. Finally, the default sys.__excepthook__(...) does not work with
    fake data, so we need to call traceback.print_exception(...) instead.
    """
    result = fake_tb(tb.tb_frame, tb.tb_lasti,
                     tb.tb_lineno, tb.tb_next)
    frame = tb.tb_frame.f_back
    while frame:
        result = fake_tb(frame, frame.f_lasti,
                         frame.f_lineno, result)
        frame = frame.f_back
    return result