code: def deprecate_entity(
          self,
          ilx_id: str,
          note = None,
          ) -> None:
          
  
          term_id, term_version = [(d['id'], d['version'])
              for d in self.ilxSearches([ilx_id], crawl=True, _print=False).values()][0]
  
          annotations = [{
              'tid': term_id,
              'annotation_tid': '306375', # id for annotation "deprecated"
              'value': 'True',
              'term_version': term_version,
              'annotation_term_version': '1', # term version for annotation "deprecated"
          }]
          if note:
              editor_note = {
                  'tid': term_id,
                  'annotation_tid': '306378', # id for annotation "editorNote"
                  'value': note,
                  'term_version': term_version,
                  'annotation_term_version': '1', # term version for annotation "deprecated"
              }
              annotations.append(editor_note)
          self.addAnnotations(annotations, crawl=True, _print=False)
          print(annotations)
docs: Tagged term in interlex to warn this term is no longer used
  
          There isn't an proper way to delete a term and so we have to mark it so I can
          extrapolate that in mysql/ttl loads.
  
          Args:
              term_id: id of the term of which to be deprecated
              term_version: version of the term of which to be deprecated
  
          Example: deprecateTerm('ilx_0101431', '6')