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: coins.go
    path of file: ./repos/cosmos-sdk/x/tx/signing/textual
    
    the code of the file until where you have to start completion: package textual

import (
	"context"
	"errors"
	"fmt"
	"sort"
	"strings"

	"google.golang.org/protobuf/reflect/protoreflect"

	bankv1beta1 "cosmossdk.io/api/cosmos/bank/v1beta1"
	basev1beta1 "cosmossdk.io/api/cosmos/base/v1beta1"
	"cosmossdk.io/math"
)

const emptyCoins = "zero"

// NewCoinsValueRenderer returns a ValueRenderer for SDK Coin and Coins.
func NewCoinsValueRenderer(q CoinMetadataQueryFn) ValueRenderer {
	return coinsValueRenderer{q}
}

type coinsValueRenderer struct {
	// coinMetadataQuerier defines a function to query the coin metadata from
	// state. It should use bank module's `DenomsMetadata` gRPC query to fetch
	// each denom's associated metadata, either 
    
func (vr coinsValueRenderer) FormatRepeated(ctx context.Context, v protoreflect.Value) ([]Screen, error) {
	if vr.coinMetadataQuerier == nil {
		return nil, errors.New("expected non-nil coin metadata querier")
	}

	protoCoins := v.List()
	coins, metadatas := make([]*basev1beta1.Coin, protoCoins.Len()), make([]*bankv1beta1.Metadata, protoCoins.Len())
	for i := 0; i < protoCoins.Len(); i++ {
		coin := &basev1beta1.Coin{}
		err := coerceToMessage(protoCoins.Get(i).Interface().(protoreflect.Message).Interface(), coin)
		if err != nil {
			return nil, err
		}
		coins[i] = coin
		metadatas[i], err = vr.coinMetadataQuerier(ctx, coin.Denom)
		if err != nil {
			return nil, err
		}
	}

	formatted, err := FormatCoins(coins, metadatas)
	if err != nil {
		return nil, err
	}

	return []Screen{{Content: formatted}}, nil
}