def get_context_with_traceback(context):
    """
    Returns the very first context that contains traceback information
    """
    if context.tb_list:
        return context
    if context.parent:
        return get_context_with_traceback(context.parent)