'Before the types and attrs get passed to the
importer they need to be altered by converting lists to
sets, etc.'

def finalize(self, return_val):

    (types, attrs) = return_val
    _attrs = {}
    for (k, v) in attrs.items():
        if (not v):
            continue
        else:
            v = filter(None, v)
        if isinstance(v, set):
            v = list(v)
        if ((k == 'actor') and (len(v) == 1)):
            v = v.pop()
        _attrs[k] = v
    return (types, _attrs)
