<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def itemgetter(k, ellipsis=False, key=None):
 """ Looks up ``k`` as an index of the column's value. If ``k`` is a ``slice`` type object, then ``ellipsis`` can be given as a string to use to indicate truncation. Alternatively, ``ellipsis`` can be set to ``True`` to use a default If a ``key`` is given, it may be a function which maps the target value to something else before the item lookup takes place. Examples:: # Choose an item from a list source. winner = columns.TextColumn("Winner", sources=['get_rankings'], processor=itemgetter(0)) description = columns.TextColumn("Description", sources=['description'], processor=itemgetter(slice(None, 30), ellipsis=True)) """

    def helper(instance, *args, **kwargs):
        default_value = kwargs.get('default_value')
        if default_value is None:
            default_value = instance
        value = default_value[k]
        if ellipsis and isinstance(k, slice) and isinstance(value, six.string_types) and \
                len(default_value) > len(value):
            if ellipsis is True:
                value += "..."
            else:
                value += ellipsis
        return value

    if key:
        helper = keyed_helper(helper)(key=key)
    return helper