code: def remove_term(self, term, remove_from_doc=True):
          
  
          try:
              self.terms.remove(term)
          except ValueError:
              pass
  
          if remove_from_doc:
              self.doc.remove_term(term)
docs: Remove a term from the terms. Must be the identical term, the same object