code: def clear(self, train, split, lfs=None):
          
          # Clear Labels for the candidates in the split passed in.
          logger.info(f"Clearing Labels (split {split})")
  
          sub_query = (
              self.session.query(Candidate.id).filter(Candidate.split == split).subquery()
          )
          query = self.session.query(Label).filter(Label.candidate_id.in_(sub_query))
          query.delete(synchronize_session="fetch")
  
          # Delete all old annotation keys
          if train:
              logger.debug(f"Clearing all LabelKeys from {self.candidate_classes}...")
              drop_all_keys(self.session, LabelKey, self.candidate_classes)
docs: Delete Labels of each class from the database.
  
          :param train: Whether or not to clear the LabelKeys.
          :type train: bool
          :param split: Which split of candidates to clear labels from.
          :type split: int
          :param lfs: This parameter is ignored.