<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_source_filter(self, source):
 """ Only search for tweets entered via given source :param source: String. Name of the source to search for. An example \ would be ``source=twitterfeed`` for tweets submitted via TwitterFeed :raises: TwitterSearchException """


        if isinstance(source, str if py3k else basestring) and len(source) >= 2:
            self.source_filter = source
        else:
            raise TwitterSearchException(1009)