def tree(label, branches=[]):
    'Construct a tree with the given label value and a list of branches.'
    for branch in branches:
        assert is_tree(branch), 'branches must be trees'
    return ([label] + list(branches))
Construct a tree with the given label value and a list of branches.
def tree(label, branches=[]):
    
    for branch in branches:
        assert is_tree(branch), 'branches must be trees'
    return ([label] + list(branches))