def METHOD_NAME(vec: List[Any]) -> int:
    """Return the (first) index with the maximum value."""
    m = np.nanmax(vec)
    for (index, value) in enumerate(vec):
        if value == m:
            return index
    return 0  # never reached