def get_tokenized_datasets(
        self,
        datasets: DatasetDict,
        contexts: Sequence[str] = (),
        choices: Sequence[str] = (),
        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.
        contexts: Sequence[str]
            A list of str containing the column names for the contexts.
            The first column contain the initial context (the first sentence).
            The second column name contains the beginning of the second sentence.
        choices:
            A list of str containing the column names for the possible continuations of the context.
        target_column: str
            The target column name
        Returns
        -------
        DatasetDict
            A dictionary of tokenized datasets.
        """
        sent1 = contexts[0]
        sent2 = contexts[1]

        def _tokenize_fn(batch: Dict[str, List[Union[str, int]]]) -> Dict:
            first_sentences = [
                [context] * self.num_unique_labels for context in batch[sent1]
            ]
            question_headers = batch[sent2]
            if len(choices) > 1:
                second_sentences = [
                    [f"{header} {batch[end][i]}" for end in choices]
                    for i, header in enumerate(question_headers)
                ]
            else:
                second_sentences = [
                    [f"{header} {end}" for end in batch[choices[0]][i]]
                    for i, header in enumerate(question_headers)
                ]
            first_sentences = sum(first_sentences, [])
            second_sentences = sum(second_sentences, [])
            tokenized_inputs = self.tokenizer(
                first_sentences, second_sentences, truncation=True
            )
            tokenized_inputs = {
                k: [
                    v[i : i + self.num_unique_labels]
                    for i in range(0, len(v), self.num_unique_labels)
                ]
                for k, v in tokenized_inputs.items()
            }
            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.
        contexts: Sequence[str]
            A list of str containing the column names for the contexts.
            The first column contain the initial context (the first sentence).
            The second column name contains the beginning of the second sentence.
        choices:
            A list of str containing the column names for the possible continuations of the context.
        target_column: str
            The target column name
        Returns
        -------
        DatasetDict
            A dictionary of tokenized datasets.
        
fortuna/data/dataset/huggingface_datasets.py