code: def process_synonyms(self, entity: List[dict]) -> List[dict]:
          
          label = entity['label']
          for synonym in entity['synonyms']:
              # these are internal errors and users should never see them
              if 'literal' not in synonym:
                  raise ValueError(f'Synonym not given a literal for label: {label}')
              elif len(synonym) > 1:
                  raise ValueError(f'Too many keys in synonym for label: {label}')
          return entity
docs: Making sure key/value is in proper format for synonyms in entity