def max_by_key(iterable):
    """
    Returns the item with the maximum value for a given key.

    Args:
        iterable (list): A list of tuples containing items to compare.

    Returns:
        tuple: The item with the maximum value.
    """
    if not iterable:
        raise ValueError("iterable argument is empty")
    
    return max(iterable, key=lambda x: x[1])