def _validate_record_type(self):
        """Validates the record type.

        Raises:
            WrongRecordTypeError: When the record type in the provided
                list does not correspond to the dataset type.
        """
        record_types = {type(rec): None for rec in self._records}
        if len(record_types) > 1:
            raise WrongRecordTypeError(
                f"A {type(self).__name__} must only contain"
                f" {self._RECORD_TYPE.__name__}s, but you provided various types:"
                f" {[rt.__name__ for rt in record_types.keys()]}"
            )
        elif next(iter(record_types)) is not self._RECORD_TYPE:
            raise WrongRecordTypeError(
                f"A {type(self).__name__} must only contain"
                f" {self._RECORD_TYPE.__name__}s, but you provided"
                f" {list(record_types.keys())[0].__name__}s."
            )
Validates the record type.

        Raises:
            WrongRecordTypeError: When the record type in the provided
                list does not correspond to the dataset type.
        
argilla-v1/src/argilla_v1/client/datasets.py