def METHOD_NAME(tree, cases):
    """
    Build new tree with only the specifiied cases
    Parameters
    ----------
    tree : list[...]
        the sidebar tree
    cases : list[int]
        the cases to keep
    Returns
    -------
    tree_final : list[...]
        the updated sidebar tree
    Examples
    --------
    form = [
        [u'Geometry', None, [
            (u'NodeID', 0, []),
            (u'ElementID', 1, []),
            (u'PropertyID', 2, []),
            (u'MaterialID', 3, []),
            (u'E', 4, []),
            (u'Element Checks', None, [
                (u'ElementDim', 5, []),
                (u'Min Edge Length', 6, []),
                (u'Min Interior Angle', 7, []),
                (u'Max Interior Angle', 8, [])],
            ),],
        ],
    ]
    cases = [1, 2, 5]
    tree2 = prune_tree(form, cases)
    >>> tree2
    [
        [u'Geometry', None, [
            (u'ElementID', 1, []),
            (u'PropertyID', 2, []),
            (u'Element Checks', None, [
                (u'ElementDim', 5, []),
            ),],
        ],
    ]
    """
    tree_final = []
    is_results, tree_final = _build_pruned_tree(tree, cases, tree_final)
    return tree_final