from pathlib import Path


def file1_is_newer_than_file2(file1, file2):
    """Like `file1 -nt file2` in bash; returns true if file2 doesn’t exist.

    Good for file-is-out-of-date checks, as logic reflects make’s default.
    """
    path1 = Path(file1)
    path2 = Path(file2)
    if not path2.exists():
        return True
    if not path1.exists():
        return False
    return path1.stat().st_mtime > path2.stat().st_mtime