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: xml_decoder.go
    path of file: ./repos/buildkit/vendor/github.com/aws/smithy-go/encoding/xml
    
    the code of the file until where you have to start completion: package xml

import (
	"encoding/xml"
	"fmt"
	"strings"
)

// NodeDecoder is a XML decoder wrapper that is responsible to decoding
// a single XML Nod
    
func (d NodeDecoder) Token() (t xml.StartElement, done bool, err error) {
	for {
		token, e := d.Decoder.Token()
		if e != nil {
			return t, done, e
		}

		// check if we reach end of the node being decoded
		if el, ok := token.(xml.EndElement); ok {
			return t, el == d.StartEl.End(), err
		}

		if t, ok := token.(xml.StartElement); ok {
			return restoreAttrNamespaces(t), false, err
		}

		// skip token if it is a comment or preamble or empty space value due to indentation
		// or if it's a value and is not expected
	}
}