<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_keywords(self, words, or_operator=False):
 """ Sets a given list as the new keyword list :param words: A list of at least 2 character long new keywords :param or_operator: Boolean. Concatenates all elements of parameter \ word with ``OR``. Enables searches for ``foo OR bar``. Default value \ is False which corresponds to a search of ``foo AND bar``. :raises: TwitterSearchException """


        if not isinstance(words, (tuple,list)):
            raise TwitterSearchException(1001)
        words = [ (i if " " not in i else '"%s"' % i)  for i in words ]
        self.searchterms = [" OR ".join(words)] if or_operator else words