code: def remove_phenotype(self, ind_obj, phenotypes=None):
          
          if phenotypes is None:
              logger.info("delete all phenotypes related to %s", ind_obj.ind_id)
              self.query(PhenotypeTerm).filter_by(ind_id=ind_obj.id).delete()
          else:
              for term in ind_obj.phenotypes:
                  if term.phenotype_id in phenotypes:
                      logger.info("delete phenotype: %s from %s",
                                  term.phenotype_id, ind_obj.ind_id)
                      self.session.delete(term)
          logger.debug('persist removals')
          self.save()
          for case_obj in ind_obj.cases:
              self.update_hpolist(case_obj)
docs: Remove multiple phenotypes from an individual.