code: def __call__(
      self, last_token: int, last_output: str
  ) -> Tuple[bool, Optional[str]]:
      self.current_tokens += 1
      if self.current_tokens >= self.max_new_tokens:
          return True, FinishReason.FINISH_REASON_LENGTH
  
      if not self.ignore_eos_token and last_token == self.eos_token_id:
          return True, FinishReason.FINISH_REASON_EOS_TOKEN
  
      if self.stop_sequence_criterias:
          self.current_output += last_output
          # There is no need to keep an output that is too long
          if len(self.current_output) > 300:
              # Slice to -200 to avoid doing it all the time
              self.current_output = self.current_output[-200:]
          for stop_sequence_criteria in self.stop_sequence_criterias:
              if stop_sequence_criteria(self.current_output):
                  return True, FinishReason.FINISH_REASON_STOP_SEQUENCE
  
      return False, None
  
imports: import re
  from typing import Callable, List, Optional, Tuple
  import torch
  from text_generation_server.pb import generate_pb2
  from text_generation_server.pb.generate_pb2 import FinishReason
  from text_generation_server.utils.logits_process import HeterogeneousProcessorWrapper, HeterogeneousRepetitionPenaltyLogitsProcessor, HeterogeneousTemperatureLogitsWarper, HeterogeneousTopKLogitsWarper, HeterogeneousTopPLogitsWarper, HeterogeneousTypicalLogitsWarper, static_warper
  from text_generation_server.utils.watermark import WatermarkLogitsProcessor
  from transformers import PreTrainedTokenizerBase, RepetitionPenaltyLogitsProcessor
label_desc: Use image node_id 2 for calling the StoppingCriteria obj's underlying member method code with example usage: obj.__call__(last_token, last_output) and returns: False,  None, True,  FinishReason, True,  FinishReason, True,  FinishReason