You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: dry_run.go
    path of file: ./repos/meshery/server/models/pattern/stages
    
    the code of the file until where you have to start completion: package stages

import (
	"github.com/layer5io/meshery/server/helpers"
	"github.com/layer5io/meshkit/models/oam/core/v1alpha1"
)

// import "github.com/layer5io/meshery/server/models/pattern/patterns"
    
func DryRun(_ ServiceInfoProvider, act ServiceActionProvider) ChainStageFunction {
	return func(data *Data, err error, next ChainStageNextFunction) {
		if err != nil {
			act.Terminate(err)
			return
		}
		var comps []v1alpha1.Component
		processAnnotations(data.Pattern)
		for name, svc := range data.Pattern.Services {
			if mesheryDefinedAPIVersions[svc.APIVersion] {
				continue
			}
			comp, err := data.Pattern.GetApplicationComponent(name)
			if err != nil {
				continue
			}
			comp.ObjectMeta.Annotations = helpers.MergeStringMaps(
				v1alpha1.GetAnnotationsForWorkload(data.PatternSvcWorkloadCapabilities[name]),
				comp.ObjectMeta.Annotations,
			)
			comps = append(comps, comp)
		}
		resp, err := act.DryRun(comps)
		if err != nil {
			act.Terminate(err)
			return
		}
		data.Lock.Lock()
		if data.Other == nil {
			data.Other = make(map[string]interface{})
		}
		data.Other[DryRunResponseKey] = resp
		data.Lock.Unlock()
		if next != nil {
			next(data, err)
		}
	}
}