def clear(self, train, split, lfs=None):
<EOL>logger.info(f"<STR_LIT>")<EOL>sub_query = (<EOL>self.session.query(Candidate.id).filter(Candidate.split == split).subquery()<EOL>)<EOL>query = self.session.query(Label).filter(Label.candidate_id.in_(sub_query))<EOL>query.delete(synchronize_session="<STR_LIT>")<EOL>if train:<EOL><INDENT>logger.debug(f"<STR_LIT>")<EOL>drop_all_keys(self.session, LabelKey, self.candidate_classes)<EOL><DEDENT>
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.