from typing import List
from typing import Iterable


def argmax_over_index_set(lst: List[float], index_set: Iterable[int]) -> List[int]:
    """
    Computes the argmax function over a subset of a list.

    In contrast to the related `np.argmax` function, this returns a list of all
    indices that have the maximal value.

    Args:
        lst (List): Find the argmax of the values in this list
        index_set (Iterabel): Restricts the list to the indices in this set

    Returns:
        List: a list of elements in index_set at which lst has the maximal value
    """
    max_idx = [0]
    max_val = -float("inf")
    for i in index_set:
        if lst[i] > max_val:
            max_val = lst[i]
            max_idx = [i]
        elif lst[i] == max_val:
            max_idx.append(i)
    return max_idx