def prefix_function(function: Callable, postfunction: Callable) -> Callable[[Any, Any], torch.Tensor]:
            """
            Huggingface returns logit under outputs.logits. To make this compatible with ART we wrap the forward pass
            function of an HF model here, which automatically extracts the logits.

            :param function: The first function to run, in our case the forward pass of the model.
            :param postfunction: Second function to run, in this case simply extracts the logits.
            :return: model outputs.
            """

            @functools.wraps(function)
            def run(*args, **kwargs) -> torch.Tensor:
                outputs = function(*args, **kwargs)
                return postfunction(outputs)

            return run

            Huggingface returns logit under outputs.logits. To make this compatible with ART we wrap the forward pass
            function of an HF model here, which automatically extracts the logits.

            :param function: The first function to run, in our case the forward pass of the model.
            :param postfunction: Second function to run, in this case simply extracts the logits.
            :return: model outputs.
            
art/estimators/classification/hugging_face.py