def make_readonly(path) -> None:
    """Change the access permissions to readonly for a given file."""
    mode = Path.stat(path).st_mode
    Path.chmod(path, mode & ~stat.S_IWRITE)
Change the access permissions to readonly for a given file.
tests/test_utils.py