How to call SideEffect in a loop?

I want to use SideEffect to execute something once PER KEY:

for _, key := range keys {
	workflow.SideEffect(ctx, func(ctx workflow.Context) interface{} {
		// do something per key...
	})
}

But IIUC the Workflow will only execute this on one key. How can I run multiple side effects like this?

Actually I think I understand Temporal will do the right thing and run SideEffect per key.. I guess it de-dups those runs based on the amount of times it is called in the code.