The verify_all function currently hints the parameters a_list as List[str] and formatter as Optional[Callable]. Perhaps better type hints would be (using 3.12 syntax but this could be done with the old-style generic type syntax):
def verify_all[T](
...
alist: List[T],
formatter: Optional[Callable[[T], str]] = None,
...
) -> None:
This would allow for any object to be passed in as the expected result with the formatter transforming the object into a string for approval — without type checkers complaining.
In fact, the default formatter for this function already calls str by default on objects from alist (see list_utils.py) when transforming the list to a string.