[PATCH 1/2] windowscodecs/tests: Move compare_metadata function so it can be used earlier.