code: def __init__(
      self, patience: int = -1, checkpoint_path: str = "checkpoint.pth"
  ):
      self.patience = patience
      self.checkpoint_path = checkpoint_path
      self.counter = 0
      self.best_score = None
      self.early_stop = False
  
imports: import torch
label_desc: Use image node_id 1 to create a new EarlyStopping object  with example: obj = EarlyStopping(patience, checkpoint_path)