def METHOD_NAME(time_filter):  # noqa: ANN001
    """Validate ``time_filter``.
    :raises: :py:class:`ValueError` if ``time_filter`` is not valid.
    """
    if time_filter not in BaseListingMixin.VALID_TIME_FILTERS:
        valid_time_filters = ", ".join(
            map("{!r}".format, BaseListingMixin.VALID_TIME_FILTERS)
        )
        msg = f"'time_filter' must be one of: {valid_time_filters}"
        raise ValueError(msg)