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: ambiguous_result_error.go
    path of file: ./repos/cockroach/pkg/kv/kvpb
    
    the code of the file until where you have to start completion: // Copyright 2022 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licens
    
func init() {
	// Register the migration of the error that used to be in the roachpb
	// package and is now in the kv/kvpb package.
	roachpbPath := reflect.TypeOf(roachpb.Key("")).PkgPath()
	errors.RegisterTypeMigration(roachpbPath, "*roachpb.AmbiguousResultError", &AmbiguousResultError{})
	// Note that it is important that these wrapper methods are registered
	// _after_ the type migration above.
	aErr := (*AmbiguousResultError)(nil)
	typeKey := errors.GetTypeKey(aErr)
	errors.RegisterWrapperEncoder(typeKey, func(ctx context.Context, err error) (msgPrefix string, safeDetails []string, payload proto.Message) {
		errors.As(err, &payload)
		return "", nil, payload
	})
	errors.RegisterWrapperDecoder(typeKey, func(ctx context.Context, cause error, msgPrefix string, safeDetails []string, payload proto.Message) error {
		return payload.(*AmbiguousResultError)
	})
}