<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def subset(self, words):
 """Get a new Vocab containing only the specified subset of words. If w is in words, but not in the original vocab, it will NOT be in the subset vocab. Indices will be in the order of `words`. Counts from the original vocab are preserved. :return (Vocab):
 a new Vocab object """

        v = self.__class__(unk=self._unk)
        unique = lambda seq: len(set(seq)) == len(seq)
        assert unique(words)
        for w in words:
            if w in self:
                v.add(w, count=self.count(w))
        return v