code: func applyGlobals(input interface{}, options *ProcessorOptions) {
  	if template, ok := input.(map[string]interface{}); ok {
  		if uglobals, ok := template["Globals"]; ok {
  			if globals, ok := uglobals.(map[string]interface{}); ok {
  				for name, globalValues := range globals {
  					for supportedGlobalName, supportedGlobalType := range supportedGlobalResources {
  						if name == supportedGlobalName {
  							if uresources, ok := template["Resources"]; ok {
  								if resources, ok := uresources.(map[string]interface{}); ok {
  									for _, uresource := range resources {
  										if resource, ok := uresource.(map[string]interface{}); ok {
  											if resource["Type"] == supportedGlobalType {
  												properties := resource["Properties"].(map[string]interface{})
  												for globalProp, globalPropValue := range globalValues.(map[string]interface{}) {
  													if _, ok := properties[globalProp]; !ok {
  														properties[globalProp] = globalPropValue
  													} else if gArray, ok := globalPropValue.([]interface{}); ok {
  														if pArray, ok := properties[globalProp].([]interface{}); ok {
  															properties[globalProp] = append(pArray, gArray...)
  														}
  													} else if gMap, ok := globalPropValue.(map[string]interface{}); ok {
  														if pMap, ok := properties[globalProp].(map[string]interface{}); ok {
  															mergo.Merge(&pMap, gMap)
  														}
  													}
  												}
  											}
  										}
  									}
  								}
  							}
  						}
  					}
  				}
  			}
  		}
  	}
  }
docs: // applyGlobals adds AWS SAM Globals into resources