'Converts collection-compatible objects to an iterable of values.
Can be passed any type of object, and if the underlying collection
determines that it can be adapted into a stream of values it can
use, returns an iterable of values suitable for append()ing.
This method may raise TypeError or any other suitable exception
if adaptation fails.
If a converter implementation is not supplied on the collection,
a default duck-typing-based implementation is used.'

def adapt_like_to_iterable(self, obj):

    converter = self._data()._sa_converter
    if (converter is not None):
        return converter(obj)
    setting_type = util.duck_type_collection(obj)
    receiving_type = util.duck_type_collection(self._data())
    if ((obj is None) or (setting_type != receiving_type)):
        given = (((obj is None) and 'None') or obj.__class__.__name__)
        if (receiving_type is None):
            wanted = self._data().__class__.__name__
        else:
            wanted = receiving_type.__name__
        raise TypeError(('Incompatible    collection    type:    %s    is    not    %s-like' % (given, wanted)))
    if (getattr(obj, '_sa_adapter', None) is not None):
        return obj._sa_adapter
    elif (setting_type == dict):
        if util.py3k:
            return obj.values()
        else:
            return getattr(obj, 'itervalues', obj.values)()
    else:
        return iter(obj)
