code: def get_ilx2synonyms(self, clean:bool=True):
          ''' clean: for list of literals only '''
          ilx2synonyms = defaultdict(list)
          header = ['Index'] + list(self.fetch_synonyms().columns)
          for row in self.fetch_synonyms().itertuples():
              row = {header[i]:val for i, val in enumerate(row)}
              if clean:
                  synonym = {'literal':row['literal'], 'type':row['type']}
                  ilx2synonyms[row['ilx']].append(synonym)
              elif not clean:
                  ilx2synonyms[row['ilx']].append(row)
          return ilx2synonymf get_ilx2synonyms(self, clean:bool=True):
          ''' clean: for list of literals only '''
          ilx2synonyms = defaultdict(list)
          header = ['Index'] + list(self.fetch_synonyms().columns)
          for row in self.fetch_synonyms().itertuples():
              row = {header[i]:val for i, val in enumerate(row)}
              if clean:
                  synonym = {'literal':row['literal'], 'type':row['type']}
                  ilx2synonyms[row['ilx']].append(synonym)
              elif not clean:
                  ilx2synonyms[row['ilx']].append(row)
          return ilx2synonyms
docs: clean: for list of literals only