code: func Write(out io.Writer, node ast.Node, options Options) (err error) {
  	defer errRecover(&err)
  
  	if options.Formatter == nil {
  		options.Formatter = &ES5Formatter{}
  	}
  
  	var (
  		tmpOut     = &bytes.Buffer{}
  		importsBuf = &bytes.Buffer{}
  		s          = &state{
  			wr:          tmpOut,
  			options:     options,
  			funcsCalled: map[string]string{},
  			funcsInFile: map[string]bool{},
  		}
  	)
  
  	s.scope.push()
  	s.walk(node)
  
  	if len(s.funcsCalled) > 0 {
  		for _, f := range difference(s.funcsCalled, s.funcsInFile) {
  			importsBuf.WriteString(s.funcsCalled[f])
  			importsBuf.WriteRune('\n')
  		}
  		importsBuf.WriteRune('\n')
  	}
  
  	out.Write(importsBuf.Bytes())
  	out.Write(tmpOut.Bytes())
  
  	return nil
  }
docs: // Write writes the javascript represented by the given node to the given
  // writer.  The first error encountered is returned.