code: def xml_equal(xml_file1, xml_file2):
      
      def canonical(xml_file):
          # poor man's canonicalization, since we don't want to install
          # external packages just for unittesting
          s = et.tostring(et.parse(xml_file).getroot()).decode("UTF-8")
          s = re.sub("[\n|\t]*", "", s)
          s = re.sub("\s+", " ", s)
          s = "".join(sorted(s)).strip()
          return s
  
      return canonical(xml_file1) == canonical(xml_file2)
docs: Parse xml and convert to a canonical string representation so we don't
      have to worry about semantically meaningless differences