def set_ids(events: list[Event]) -> None:
    """Set the IDs of the events in the list to their index."""
    for i, e in enumerate(events):
        e._id = i  # type: ignore
Set the IDs of the events in the list to their index.
tests/unit/test_view.py