<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_synonym(self, input_word):
 """ Generate Synonym using a WordNet synset. """

         results = []
         results.append(input_word)
         synset = wordnet.synsets(input_word)
         for i in synset:
             index = 0
             syn = i.name.split('.')
             if syn[index]!= input_word:
                 name = syn[0]
                 results.append(PataLib().strip_underscore(name))
             else:
                 index = index + 1
         results = {'input' : input_word, 'results' : results, 'category' : 'synonym'} 
         return results