from typing import List
from typing import Any
from typing import Tuple


def replace_or_set(list_1: List[Any], value: Any, index: int) -> Tuple[List[Any], Any, int]:
    """
    Replaces or sets the given value in the given list according to the index value.

    Parameters
    __________
    list_1: List[Any]
        The list which the modifications has to be made.
    value: Any
        The value which has to be replaced or set to the given list.
    index: int
        Index value where the value needs to be replaced or set.

    Raises
    ______
    IndexError
         If the wrong index is passed.

    Returns
    _______
    Updated list, the value passed and the index of the value.

    Return Type
    ___________
    Tuple[List[Any], Any, int]

    """
    print(len(list_1))
    print(index)
    print(-1 < index < len(list_1))
    if not -1 < index < len(list_1):
        raise IndexError("The index you sent is invalid!")
    list_1[index] = value
    return list_1, value, index