parameters: (package_name, name_leafs)
return_statement: return imp
docstring: Return an import statement in the form:
          from package import name_leafs
docstring_summary: Return an import statement in the form:
          from package import name_leafs
docstring_tokens: Return an import statement in the form : from package import name_leafs
function: def FromImport(package_name, name_leafs):
      """ Return an import statement in the form:
          from package import name_leafs"""
      # XXX: May not handle dotted imports properly (eg, package_name='foo.bar')
      #assert package_name == '.' or '.' not in package_name, "FromImport has "\
      #       "not been tested with dotted package names -- use at your own "\
      #       "peril!"
  
      for leaf in name_leafs:
          # Pull the leaves out of their old tree
          leaf.remove()
  
      children = [Leaf(token.NAME, u"from"),
                  Leaf(token.NAME, package_name, prefix=u" "),
                  Leaf(token.NAME, u"import", prefix=u" "),
                  Node(syms.import_as_names, name_leafs)]
      imp = Node(syms.import_from, children)
      return imp
function_tokens: def FromImport ( package_name , name_leafs ) : # XXX: May not handle dotted imports properly (eg, package_name='foo.bar') #assert package_name == '.' or '.' not in package_name, "FromImport has "\ #       "not been tested with dotted package names -- use at your own "\ #       "peril!" for leaf in name_leafs : # Pull the leaves out of their old tree leaf . remove ( ) children = [ Leaf ( token . NAME , u"from" ) , Leaf ( token . NAME , package_name , prefix = u" " ) , Leaf ( token . NAME , u"import" , prefix = u" " ) , Node ( syms . import_as_names , name_leafs ) ] imp = Node ( syms . import_from , children ) return imp