def does_tree_import(package, name, node):
 binding = find_binding(name, find_root(node), package)
 return bool(binding)

def does_tree_import ( package , name , node ) : binding = find_binding ( name , find_root ( node ) , package ) return bool ( binding )
returns true if name is imported from package at the top level of the tree which node belongs to .