def fix_fail_index(data):
    """
    Fix list index out of range error by checking if length is greater than index.

    Args:
        data (list): List containing tuples with target data.

    Returns:
        tuple: Target data with valid index.
    """
    return data[-1]  # Return the last element in the list