def in_nested_list(nested_list, obj):
    'return true if the object is an element of <nested_list> or of a nested\n    list\n    '
    for elmt in nested_list:
        if isinstance(elmt, (list, tuple)):
            if in_nested_list(elmt, obj):
                return True
        elif (elmt == obj):
            return True
    return False
return true if the object is an element of <nested_list> or of a nested
list
def in_nested_list(nested_list, obj):
    'return true if the object is an element of <nested_list> or of a nested\n    list\n    '
    for elmt in nested_list:
        if isinstance(elmt, (list, tuple)):
            if in_nested_list(elmt, obj):
                return True
        elif (elmt == obj):
            return True
    return False