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: test_common.go
    path of file: ./repos/client/go/libkb
    
    the code of the file until where you have to start completion: // Copyright 2015 Keybase, Inc. All rights reserved. Use of
// this source code is gove
    
func (tc *TestContext) Cleanup() {
	// stop the background logger
	close(tc.cleanupCh)
	err := tc.eg.Wait()
	require.NoError(tc.T, err)

	tc.G.Log.Debug("global context shutdown:")
	mctx := NewMetaContextForTest(*tc)
	err = tc.G.Shutdown(mctx) // could error due to missing pid file
	if err != nil {
		tc.G.Log.Warning("tc.G.Shutdown failed: %s", err)
	}
	if len(tc.Tp.Home) > 0 {
		tc.G.Log.Debug("clearing stored secrets:")
		err := tc.ClearAllStoredSecrets()
		tc.G.Log.Debug("cleaning up %s", tc.Tp.Home)
		os.RemoveAll(tc.Tp.Home)
		require.NoError(tc.T, err)
	}
	tc.G.Log.Debug("cleanup complete")

	// Don't use the test logger anymore, since it's now out of scope
	tc.G.Log = tc.origLog
}