def from_set(cls, database, key, data, clear=False):
        """
        Create and populate a Set object from a data set.
        """
        s = cls(database, key)
        if clear:
            s.clear()
        s.add(*data)
        return s
Create and populate a Set object from a data set.