code: def step(self, loss, acc, model):
      if self.best_loss is None:
          self.best_acc = acc
          self.best_loss = loss
          self.save_checkpoint(model)
      elif (loss > self.best_loss) and (acc < self.best_acc):
          self.counter += 1
          print(
              f"EarlyStopping counter: {self.counter} out of {self.patience}"
          )
          if self.counter >= self.patience:
              self.early_stop = True
      else:
          if (loss <= self.best_loss) and (acc >= self.best_acc):
              self.save_checkpoint(model)
          self.best_loss = np.min((loss, self.best_loss))
          self.best_acc = np.max((acc, self.best_acc))
          self.counter = 0
      return self.early_stop
  
file_path: AutoGL/test/performance/heterogeneous/dgl/helper.py
imports: import numpy
  import pickle
label_desc: Use image node_id 2 for calling the EarlyStopping obj's underlying member method code with example usage: obj.step(loss, acc, model) and returns: self