code: func SetGlobals(reg template.Registry, globals data.Map) error {
  	for _, t := range reg.Templates {
  		if err := SetNodeGlobals(t.Node, globals); err != nil {
  			return fmt.Errorf("template %v: %v", t.Node.Name, err)
  		}
  	}
  	return nil
  }
docs: // SetGlobals sets the value of all global nodes in the given registry.
  // An error is returned if any globals were left undefined.