code: def does_tree_import(package, name, node):
      """Returns true if name is imported from package at the
      top level of the tree which node belongs to.
      To cover the case of an import like 'import foo', use
      None for the package and 'foo' for the name."""
      binding = find_binding(name, find_root(node), package)
      return bool(binding)
  
imports: from itertools import islice
  from .pgen2 import token
  from .pytree import Leaf, Node
  from .pygram import python_symbols
  from .None import patcomp
label_desc: Use image node_id 27 for calling a global function with example usage: does_tree_import(package, name, node) and returns: bool