class_docstr: Custom `StoppingCriteria` which checks if all generations in the batch are completed.
code: def __init__(self, stop_strings, tokenizer):
      self.stop_strings = stop_strings
      self.tokenizer = tokenizer
      self.first_call = True
  
imports: import re
  import warnings
  import torch
  from accelerate.utils import extract_model_from_parallel
  from transformers import StoppingCriteria, StoppingCriteriaList
  from ..import_utils import is_rich_available
label_desc: Use image node_id 1 to create a new StringStoppingCriteria object from inherited base classes: StoppingCriteria with example: obj = StringStoppingCriteria(stop_strings, tokenizer)