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: tester.go
    path of file: ./repos/arvados/lib/cloud/cloudtest
    
    the code of the file until where you have to start completion: // Copyright (C) The Arvados Authors. All rights reserved.
//
// SPDX-Lice
    
func (t *tester) destroyTestInstance() bool {
	if t.testInstance == nil {
		return true
	}
	for {
		lgr := t.Logger.WithField("Instance", t.testInstance.ID())
		lgr.Info("destroying instance")
		t0 := time.Now()

		err := t.testInstance.Destroy()
		lgrDur := lgr.WithField("Duration", time.Since(t0))
		if err != nil {
			lgrDur.WithError(err).Error("error destroying instance")
		} else {
			lgrDur.Info("destroyed instance")
		}

		err = t.refreshTestInstance()
		if err == errTestInstanceNotFound {
			lgr.Info("instance no longer appears in list")
			t.testInstance = nil
			return true
		} else if err == nil {
			lgr.Info("instance still exists after calling Destroy")
			t.sleepSyncInterval()
			continue
		} else {
			t.Logger.WithError(err).Error("error getting list of instances")
			continue
		}
	}
}