def max_function(input_list):
    """
    Returns the maximum value from a list of tuples.

    Args:
        input_list (list): A list of tuples containing data.

    Returns:
        tuple: The tuple with the maximum value in the third position.
    """
    if not input_list:
        raise ValueError("Input list is empty")
    
    return max(input_list, key=lambda x: x[2])