'Will extend the value given with new_value (and will turn both
into lists if they are not so already). The values are run through
a set to remove duplicate values.'

def _extend_value(self, value, new_value, prepend=False):

    if (not isinstance(value, list)):
        value = [value]
    if (not isinstance(new_value, list)):
        new_value = [new_value]
    if prepend:
        combined = (new_value + value)
    else:
        combined = (value + new_value)
    return [i for (i, _) in itertools.groupby(combined) if (i is not None)]
