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: levels.go
    path of file: ./repos/photoprism/pkg/level
    
    the code of the file until where you have to start completion: package level

import (
	"fmt"
)

// Severity levels.
const (
	Emergency Severity = iota
	Alert
	Critical
	Error
	Warning
	Notice
	Info
	Debug
)

// Level
    
func (level Severity) MarshalText() ([]byte, error) {
	switch level {
	case Debug:
		return []byte("debug"), nil
	case Info:
		return []byte("info"), nil
	case Notice:
		return []byte("notice"), nil
	case Warning:
		return []byte("warning"), nil
	case Error:
		return []byte("error"), nil
	case Critical:
		return []byte("critical"), nil
	case Alert:
		return []byte("alert"), nil
	case Emergency:
		return []byte("emergency"), nil
	}

	return nil, fmt.Errorf("not a valid severity level %d", level)
}