code: def __init__(self, patience=10):
      dt = datetime.datetime.now()
      self.filename = "early_stop_{}_{:02d}-{:02d}-{:02d}.pth".format(
          dt.date(), dt.hour, dt.minute, dt.second
      )
      self.patience = patience
      self.counter = 0
      self.best_acc = None
      self.best_loss = None
      self.early_stop = False
  
imports: import sys
  import datetime
  import dgl
  import errno
  import numpy
  import os
  import pickle
  import random
  import torch
  from dgl.data.utils import download, get_download_dir, _get_dgl_url
  import os.path
  from pprint import pprint
  from scipy import sparse
  from scipy import io
label_desc: Use image node_id 1 to create a new EarlyStopping object from inherited base classes: object with example: obj = EarlyStopping(patience)