def is_scheduled(num_words, frequency, words_per_iteration):
    """Checks if an event is scheduled to be performed within given number
    of updates after this point.

    For example, word_per_iteration=9, frequency=2:

    num_words:      1   2   3   4  [5]  6   7   8  [9] 10  11  12
    * frequency:    2   4   6   8  10  12  14  16  18  20  22  24
    modulo:         2   4   6   8   1   3   5   7   0   2   4   6

    :type num_words: int
    :param num_words: number of words so far

    :type frequency: int
    :param frequency: how many times per iteration the event should be performed

    :type words_per_iteration: int
    :param words_per_iteration: number of words in one iteration

    :rtype: bool
    :returns: whether the operation is scheduled to be performed
    """

    modulo = num_words * frequency % words_per_iteration
    return modulo < frequency