def _remove_unsupported_columns(
        cls,
        dataset: "datasets.Dataset",
        extra_columns: List[str],
    ) -> "datasets.Dataset":
        """Helper function to remove unsupported columns from the `datasets.Dataset` following the record type.

        Args:
            dataset: The dataset.
            extra_columns: Extra columns to be kept.

        Returns:
            The dataset with unsupported columns removed.
        """
        not_supported_columns = [
            col for col in dataset.column_names if col not in cls._record_init_args() + extra_columns
        ]

        if not_supported_columns:
            warnings.warn(
                "Following columns are not supported by the"
                f" {cls._RECORD_TYPE.__name__} model and are ignored:"
                f" {not_supported_columns}"
            )
            dataset = dataset.remove_columns(not_supported_columns)

        return dataset
Helper function to remove unsupported columns from the `datasets.Dataset` following the record type.

        Args:
            dataset: The dataset.
            extra_columns: Extra columns to be kept.

        Returns:
            The dataset with unsupported columns removed.
        
argilla-v1/src/argilla_v1/client/datasets.py