:param trigger_frequency: human-readable and editable string in one of two formats:
     - 'at Day_of_Week-HH:MM, ..., Day_of_Week-HH:MM'
     - 'every NNN'
    :return: return tuple (parsed_trigger_frequency, timer_klass)

def parse_time_trigger_string(trigger_frequency):
    """
    :param trigger_frequency: human-readable and editable string in one of two formats:
     - 'at Day_of_Week-HH:MM, ..., Day_of_Week-HH:MM'
     - 'every NNN'
    :return: return tuple (parsed_trigger_frequency, timer_klass)
    """
    # replace multiple spaces with one
    trigger_frequency = ' '.join(trigger_frequency.split())

    if trigger_frequency.startswith(TRIGGER_PREAMBLE_AT):
        # EventClock block
        trigger_frequency = trigger_frequency[len(TRIGGER_PREAMBLE_AT):]
        parsed_trigger_frequency = trigger_frequency.replace(' ', '').replace(',', ' ').split(' ')
        timer_klass = EventClock
    elif trigger_frequency.startswith(TRIGGER_PREAMBLE_EVERY):
        # RepeatTimer block
        trigger_frequency = trigger_frequency[len(TRIGGER_PREAMBLE_EVERY):]
        parsed_trigger_frequency = int(trigger_frequency)
        timer_klass = RepeatTimer
    else:
        raise ValueError('Unknown time trigger format {0}'.format(trigger_frequency))

    return parsed_trigger_frequency, timer_klass