def map_preprocess_func(self, preproc_func, batched, columns_to_keep=[]):
        """
        Applies a preprocessing function to the wrapped Hugging Face Datasets.

        Args:
        - preproc_func: A preprocessing function that will be applied to the
            dataset. See H.F. library documentation for details.
        - batched: A boolean indicating whether the preprocessing function
            should be applied to the dataset in batches.
        - columns_to_keep: A list of column names to keep in the dataset
            after the preprocessing function has been applied. If set to an
            empty list (default), ONLY columns added by the preproc_func will
            be kept.

        Returns:
        None
        """

        if len(columns_to_keep) == 0:
            old_f = self._all_features()
            self.dataset = self.dataset.map(preproc_func, batched=batched)
            new_f = self._all_features() - old_f
            print(f"The following columns are removed from dataset: {old_f}")
            self.dataset = self.dataset.remove_columns(list(old_f))
            print(f"Kept columns: {new_f - old_f}")
            print(
                "If the resulting dataset has 0 columns left. Please ensure"
                "that the preprocessing phase saves the modified features in"
                "new columns or pass a list of column names"
            )
        else:
            old_f = self._all_features()
            self.dataset = self.dataset.map(preproc_func, batched=batched)
            to_remove = old_f - columns_to_keep
            self.dataset = self.dataset.remove_columns(list(to_remove))
            print(
                f"The following columns have been removed" "from dataset: {to_remove}"
            )
        print("Dataset features: ", self.dataset.features.keys())

        Applies a preprocessing function to the wrapped Hugging Face Datasets.

        Args:
        - preproc_func: A preprocessing function that will be applied to the
            dataset. See H.F. library documentation for details.
        - batched: A boolean indicating whether the preprocessing function
            should be applied to the dataset in batches.
        - columns_to_keep: A list of column names to keep in the dataset
            after the preprocessing function has been applied. If set to an
            empty list (default), ONLY columns added by the preproc_func will
            be kept.

        Returns:
        None
        
examples/hf_datawrapper.py