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: content.go
    path of file: ./repos/cosmos-sdk/x/gov/types/v1
    
    the code of the file until where you have to start completion: package v1

import (
	"fmt"

	"github.com/cosmos/gogoproto/proto"

	"cosmossdk.io/x/gov/types/v1beta1"

	codectypes "github.com/cosmos/cosmos-sdk/codec/types"
	sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)

// NewLegacyContent creates a new MsgExecLegacyContent from a legacy Content
// inte
    
func NewLegacyContent(content v1beta1.Content, authority string) (*MsgExecLegacyContent, error) {
	msg, ok := content.(proto.Message)
	if !ok {
		return nil, fmt.Errorf("%T does not implement proto.Message", content)
	}

	any, err := codectypes.NewAnyWithValue(msg)
	if err != nil {
		return nil, err
	}

	return NewMsgExecLegacyContent(any, authority), nil
}