'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):

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