def wrapped(xs: Sequence, *args_, **kwargs_) -> tuple:
    index_ = {((i + len(xs)) if (i < 0) else i) for i in index}
    for idx in index_:
        if ((idx < 0) or (idx >= len(xs))):
            raise IndexError(f'Index {idx} out of bounds.')
    return tuple(((func(x, *args_, *args, **kwargs_, **kwargs) if (i in index_) else x) for (i, x) in enumerate(xs)))
def wrapped(xs: Sequence, *args_, **kwargs_) -> tuple:
    index_ = {((i + len(xs)) if (i < 0) else i) for i in index}
    for idx in index_:
        if ((idx < 0) or (idx >= len(xs))):
            raise IndexError(f'Index {idx} out of bounds.')
    return tuple(((func(x, *args_, *args, **kwargs_, **kwargs) if (i in index_) else x) for (i, x) in enumerate(xs)))