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: bytes.go
    path of file: ./repos/kubeedge/vendor/github.com/google/cel-go/common/types
    
    the code of the file until where you have to start completion: // Copyright 2018 Google LLC
//
// 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 copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, 
    
func (b Bytes) ConvertToNative(typeDesc reflect.Type) (interface{}, error) {
	switch typeDesc.Kind() {
	case reflect.Array, reflect.Slice:
		return reflect.ValueOf(b).Convert(typeDesc).Interface(), nil
	case reflect.Ptr:
		switch typeDesc {
		case anyValueType:
			// Primitives must be wrapped before being set on an Any field.
			return anypb.New(wrapperspb.Bytes([]byte(b)))
		case byteWrapperType:
			// Convert the bytes to a wrapperspb.BytesValue.
			return wrapperspb.Bytes([]byte(b)), nil
		case jsonValueType:
			// CEL follows the proto3 to JSON conversion by encoding bytes to a string via base64.
			// The encoding below matches the golang 'encoding/json' behavior during marshaling,
			// which uses base64.StdEncoding.
			str := base64.StdEncoding.EncodeToString([]byte(b))
			return structpb.NewStringValue(str), nil
		}
	case reflect.Interface:
		bv := b.Value()
		if reflect.TypeOf(bv).Implements(typeDesc) {
			return bv, nil
		}
		if reflect.TypeOf(b).Implements(typeDesc) {
			return b, nil
		}
	}
	return nil, fmt.Errorf("type conversion error from Bytes to '%v'", typeDesc)
}