def last_index_of(array, value, from_index=None):
    """Gets the index at which the last occurrence of value is found.

    Args:
        array (list): List to search.
        value (mixed): Value to search for.
        from_index (int, optional): Index to search from.

    Returns:
        int: Index of found item or ``False`` if not found.

    Example:

        >>> last_index_of([1, 2, 2, 4], 2)
        2
        >>> last_index_of([1, 2, 2, 4], 2, from_index=1)
        1

    .. versionadded:: 1.0.0
    """
    index = array_len = len(array)
    try:
        from_index = int(from_index)
    except (TypeError, ValueError):
        pass
    else:
        index = max(0, index + from_index) if from_index < 0 else min(
            from_index, index - 1)
    while index:
        if index < array_len and array[index] == value:
            return index
        index -= 1
    return -1
