def query_interval_tree_by_type(interval_tree, time, type):
    """
    Returns only items of specified type from interval tree at given time.
    """
    all_intervals = interval_tree[time]

    selected_intervals = set()
    for interval in all_intervals:
        if isinstance(interval[-1], type):
            selected_intervals.add(interval.data)

    return selected_intervals