Comment h5_files = h5_files[0] in def equalize to make it work properly. Uncomment it to see the correct answer