code: func importsForRootNode(rootNode *ast.File) (imports *ast.GenDecl, err error) {
  	for _, declaration := range rootNode.Decls {
  		decl, ok := declaration.(*ast.GenDecl)
  		if !ok || len(decl.Specs) == 0 {
  			continue
  		}
  
  		_, ok = decl.Specs[0].(*ast.ImportSpec)
  		if ok {
  			imports = decl
  			return
  		}
  	}
  
  	err = errors.New(fmt.Sprintf("Could not find imports for root node:\n\t%#v\n", rootNode))
  	return
  }
docs: /*
   * Given the root node of an AST, returns the node containing the
   * import statements for the file.
   */