def METHOD_NAME(self, *args, **kwargs) -> BatchEncoding:
    is_split_into_words = kwargs.get("is_split_into_words", False)
    if not (self.add_prefix_space or not is_split_into_words):
        raise Exception(
            f"You need to instantiate {self.__class__.__name__} with add_prefix_space=True to use it with"
            " pretokenized inputs."
        )
    return super().METHOD_NAME(*args, **kwargs)