def accordion_shut(accordion):
    """由于版本兼容ipython widgets问题，所以需要对折叠内容做不同处理，且需要捕获异常"""
    try:
        accordion.selected_index = -1
    except:
        try:
            accordion.selected_index = None
        except:
            pass
