import types


def frame_from_traceback(tb: types.TracebackType) -> types.FrameType:
    """
    Extract the bottom stack frame from a traceback

    :param tb: traceback to extract the frame
    :return: bottom stack frame
    """
    while tb.tb_next:
        tb = tb.tb_next
    return tb.tb_frame