docs: def compare_hdf_files(file1, file2):
      """ Compare two hdf files.
      :param file1: First file to compare.
      :param file2: Second file to compare.
  
      :returns True if they are the same.
      """
      data1 = FileToDict()
      data2 = FileToDict()
      scanner1 = data1.scan
      scanner2 = data2.scan
      with h5py.File(file1, 'r') as fh1:
          fh1.visititems(scanner1)
      with h5py.File(file2, 'r') as fh2:
          fh2.visititems(scanner2)
      return data1.contents == data2.contents