def get_tokenized_datasets(
        self,
        datasets: DatasetDict,
        text_columns: Sequence[str] = ("sentence",),
        target_column: str = "label",
        **kwargs,
    ) -> DatasetDict:
        """
        Converts one or more dataset into sequences of tokens, using the tokenizer.

        Parameters
        ----------
        datasets: DatasetDict
            A dictionary of `datasets.Dataset` that have to be encoded.
        text_columns: str
            A list containing the text column names, whose text sequences has to be encoded.
        target_column: str
            The target column name

        Returns
        -------
        DatasetDict
            A dictionary of tokenized datasets.
        """

        def _tokenize_fn(batch: Dict[str, List[Union[str, int]]]) -> BatchEncoding:
            tokenized_inputs = self.tokenizer(
                *[batch[col] for col in text_columns],
                padding="max_length" if self.padding == "max_length" else False,
                max_length=self.max_length,
                truncation=True,
            )
            if target_column in batch:
                tokenized_inputs["label"] = batch[target_column]
            return tokenized_inputs

        tokenized_datasets = datasets.map(
            _tokenize_fn,
            batched=True,
            remove_columns=datasets[list(datasets.keys())[0]].column_names,
        )
        return tokenized_datasets

        Converts one or more dataset into sequences of tokens, using the tokenizer.

        Parameters
        ----------
        datasets: DatasetDict
            A dictionary of `datasets.Dataset` that have to be encoded.
        text_columns: str
            A list containing the text column names, whose text sequences has to be encoded.
        target_column: str
            The target column name

        Returns
        -------
        DatasetDict
            A dictionary of tokenized datasets.
        
fortuna/data/dataset/huggingface_datasets.py