<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_language(self, lang):
 """ Sets 'lang' parameter used to only fetch tweets within \ a certain language :param lang: A 2-letter language code string (ISO 6391 compatible) :raises: TwitterSearchException """


        if lang in self.iso_6391:
            self.arguments.update({'lang': '%s' % lang})
        else:
            raise TwitterSearchException(1002)