def split_stack(stack):
    """
    Splits the stack into two, before and after the framework
    """
    stack_before, stack_after = list(), list()
    in_before = True
    for frame in stack:
        if 'flow/core' in frame[0]:
            in_before = False
        else:
            if in_before:
                stack_before.append(frame)
            else:
                stack_after.append(frame)
    return stack_before, stack_after