<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_proxy(self, proxy):
 """ Sets a HTTPS proxy to query the Twitter API :param proxy: A string of containing a HTTPS proxy \ e.g. ``set_proxy("my.proxy.com:8080")``. :raises: TwitterSearchException """


        if isinstance(proxy, str if py3k else basestring):
            self.__proxy = proxy
        else:
            raise TwitterSearchException(1009)