def nut_finder(t):
    "Returns True if t contains a node with the value 'nut' and\n    False otherwise.\n\n    >>> scrat = tree('nut')\n    >>> nut_finder(scrat)\n    True\n    >>> sproul = tree('roots', [tree('branch1', [tree('leaf'), tree('nut')]), tree('branch2')])\n    >>> nut_finder(sproul)\n    True\n    >>> numbers = tree(1, [tree(2), tree(3, [tree(4), tree(5)]), tree(6, [tree(7)])])\n    >>> nut_finder(numbers)\n    False\n    >>> t = tree(1, [tree('nut',[tree('not nut')])])\n    >>> nut_finder(t)\n    True\n    "
    if (label(t) == 'nut'):
        return True
    for node in branches(t):
        if nut_finder(node):
            return True
    return False
Returns True if t contains a node with the value 'nut' and
False otherwise.

>>> scrat = tree('nut')
>>> nut_finder(scrat)
True
>>> sproul = tree('roots', [tree('branch1', [tree('leaf'), tree('nut')]), tree('branch2')])
>>> nut_finder(sproul)
True
>>> numbers = tree(1, [tree(2), tree(3, [tree(4), tree(5)]), tree(6, [tree(7)])])
>>> nut_finder(numbers)
False
>>> t = tree(1, [tree('nut',[tree('not nut')])])
>>> nut_finder(t)
True
def nut_finder(t):
    "Returns True if t contains a node with the value 'nut' and\n    False otherwise.\n\n    >>> scrat = tree('nut')\n    >>> nut_finder(scrat)\n    True\n    >>> sproul = tree('roots', [tree('branch1', [tree('leaf'), tree('nut')]), tree('branch2')])\n    >>> nut_finder(sproul)\n    True\n    >>> numbers = tree(1, [tree(2), tree(3, [tree(4), tree(5)]), tree(6, [tree(7)])])\n    >>> nut_finder(numbers)\n    False\n    >>> t = tree(1, [tree('nut',[tree('not nut')])])\n    >>> nut_finder(t)\n    True\n    "
    if (label(t) == 'nut'):
        return True
    for node in branches(t):
        if nut_finder(node):
            return True
    return False