def files_changed(new_mtimes, initial_mtimes):
    """
    Compares `new_mtimes` with `initial_mtimes` and returns True if
    a key is not in both dicts or the value of a key is not the same.
    """
    for f in new_mtimes:
        if not f in initial_mtimes:
            return True
        elif initial_mtimes[f] != new_mtimes[f]:
            return True
    for f in initial_mtimes:
        if not f in new_mtimes:
            return True
    return False
