def METHOD_NAME(
    self,
    *,
    time_filter: str = "all",
    **generator_kwargs: str | int | dict[str, str],
) -> Iterator[Any]:
    """Return a :class:`.ListingGenerator` for top items.
    :param time_filter: Can be one of: ``"all"``, ``"day"``, ``"hour"``,
        ``"month"``, ``"week"``, or ``"year"`` (default: ``"all"``).
    :raises: :py:class:`ValueError` if ``time_filter`` is invalid.
    Additional keyword arguments are passed in the initialization of
    :class:`.ListingGenerator`.
    This method can be used like:
    .. code-block:: python
        reddit.domain("imgur.com").top(time_filter="week")
        reddit.multireddit(redditor="samuraisam", name="programming").top(time_filter="day")
        reddit.redditor("spez").top(time_filter="month")
        reddit.redditor("spez").comments.top(time_filter="year")
        reddit.redditor("spez").submissions.top(time_filter="all")
        reddit.subreddit("all").top(time_filter="hour")
    """
    self._validate_time_filter(time_filter)
    self._safely_add_arguments(
        arguments=generator_kwargs, key="params", t=time_filter
    )
    url = self._prepare(arguments=generator_kwargs, sort="top")
    return ListingGenerator(self._reddit, url, **generator_kwargs)