def filter_values(item):
    """
    Returns last element of the tuple or ``item`` itself.

    :param object item: It can be tuple, list or just an object.

    >>> filter_values(1)
    ... 1
    >>> filter_values((1, 2))
    ... 2
    """
    if isinstance(item, tuple):
        return item[-1]
    return item