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: spotlog.go
    path of file: ./repos/erda/internal/tools/monitor/oap/collector/lib/protoparser/spotlog
    
    the code of the file until where you have to start completion: // Copyright (c) 2021 Terminus, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a cop
    
func normalize(data *log.Log) {
	if data.Tags == nil {
		data.Tags = make(map[string]string)
	}

	if data.Time != nil {
		data.Timestamp = data.Time.UnixNano()
		data.Time = nil
	}

	// setup level
	if level, ok := data.Tags[logLevelTag]; ok {
		data.Tags[logLevelTag] = strings.ToUpper(level)
	} else {
		data.Tags[logLevelTag] = logLevelInfoValue
	}

	// setup request id
	if reqID, ok := data.Tags[logReqIDTag]; ok {
		data.Tags[logTraceTag] = reqID
	} else if reqID, ok = data.Tags[logTraceTag]; ok {
		data.Tags[logReqIDTag] = reqID
	} else if reqID, ok = data.Tags[logReqIDTagV1]; ok {
		data.Tags[logReqIDTag] = reqID
		data.Tags[logTraceTag] = reqID
		delete(data.Tags, logReqIDTagV1)
	}

	// setup org name
	if _, ok := data.Tags[logDiceOrgTag]; !ok {
		if org, ok := data.Tags[logOrgTag]; ok {
			data.Tags[logDiceOrgTag] = org
		}
	}

	// setup log key for compatibility
	key, ok := data.Tags[logMonitorKeyTag]
	if !ok {
		key, ok = data.Tags[logTerminusKeyTag]
		if ok {
			data.Tags[logMonitorKeyTag] = key
		}
	}

	// setup log id
	for _, key := range idKeys {
		if val, ok := data.Tags[key]; ok {
			data.ID = val
			break
		}
	}

	// setup default stream
	if data.Stream == "" {
		data.Stream = logStreamStdout
	}
}