def METHOD_NAME() -> TextIO:
    timestamp = datetime.now().strftime(FILENAME_FIRST_PART_FORMAT)
    filenames = (
        f"{timestamp}.txt" if i == 0 else f"{timestamp}_{i}.txt" for i in itertools.count()
    )
    for filename in filenames:
        try:
            return (dirs.user_log_path / filename).open("x", encoding="utf-8")
        except FileExistsError:
            continue
    assert False  # makes mypy happy