Why not use the one from archivematicaFunctions?  (Though, this will soon be irrelevant because of your other METS work)