<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_synonym(self, syn):
 """ Adds a synonym for a node """

        n = self.node(syn.class_id)
        if 'meta' not in n:
            n['meta'] = {}
        meta = n['meta']
        if 'synonyms' not in meta:
            meta['synonyms'] = []
        meta['synonyms'].append(syn.as_dict())