src/transformers/generation_stopping_criteria.py/StoppingCriteria/__call__
class StoppingCriteria:    def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
        raise NotImplementedError("StoppingCriteria needs to be subclassed")