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: tags.go
    path of file: ./repos/k6/js/common
    
    the code of the file until where you have to start completion: package common

import (
	"fmt"
	"reflect"

	"github.com/dop251/goja"
	"go.k6.io/k6/metrics"
)

// ApplyCustomUserTags modifies the given metrics.TagsAndMeta object with the
// user specified custom tags and metadata.
// It expects to receive th
    
func ApplyCustomUserTags(rt *goja.Runtime, tagsAndMeta *metrics.TagsAndMeta, keyValues goja.Value) error {
	if keyValues == nil || goja.IsNull(keyValues) || goja.IsUndefined(keyValues) {
		return nil
	}

	keyValuesObj := keyValues.ToObject(rt)

	for _, key := range keyValuesObj.Keys() {
		if err := ApplyCustomUserTag(tagsAndMeta, key, keyValuesObj.Get(key)); err != nil {
			return err
		}
	}

	return nil
}