'Checks the `unique` keyword parameter -- may be a sequence or string.'

def check_unique(self, unique):

    if isinstance(unique, (list, tuple)):
        for attr in unique:
            if (not (attr in self.mapping)):
                raise ValueError
    elif isinstance(unique, six.string_types):
        if (unique not in self.mapping):
            raise ValueError
    else:
        raise TypeError('Unique    keyword    argument    must    be    set    with    a    tuple,    list,    or    string.')
