def reverse_index(l: list, v):
    """
    Find the index of the last occurrence of an element in a list.

    Parameters
    ----------
    l: list
        The container of all elements
    v: object
        The element to be found

    Returns
    -------
    int:
        The index of the last occurrence of `v` in `l`.

    Raises
    ------
    ValueError
        If the element is not found in the list.
    """
    if v not in l:
        raise ValueError
    return len(l) - l[::-1].index(v) - 1