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: device_remove_test.go
    path of file: ./repos/heketi/tests/functional/TestErrorHandling/tests
    
    the code of the file until where you have to start completion: // +build functional

//
// Copyright (c) 2020 The heketi Authors
//
// This file is licensed to you under your choice of the GNU Lesser
// General Public License, version 3 or any later version (LGPLv3 or
// later), as published by the Free Software Foundation,
// or under the Apache License, Version 2.0 <LICENSE-APACHE2
    
func perDeviceUsedSize(t *testing.T) map[string]uint64 {
	data := map[string]uint64{}
	topo, err := heketi.TopologyInfo()
	tests.Assert(t, err == nil, "expected err == nil, got:", err)
	for _, c := range topo.ClusterList {
		for _, n := range c.Nodes {
			for _, d := range n.DevicesInfo {
				data[d.Id] += d.Storage.Used
			}
		}
	}
	return data
}