async def METHOD_NAME(self, user: User, dataset: Dataset, settings: TokenClassificationSettings):
    if settings and settings.label_schema:
        results = self.__metrics__.summarize_metric(
            dataset=dataset,
            metric=DatasetLabels(),
            record_class=ServiceTokenClassificationRecord,
            query=None,
        )
        if results:
            labels = results.get("labels", [])
            label_schema = set([label.name for label in settings.label_schema.labels])
            for label in labels:
                if label not in label_schema:
                    raise BadRequestError(
                        f"The label {label} was found in the dataset but not in provided labels schema. "
                        "\nPlease, provide a valid labels schema according to stored records in the dataset"
                    )