code: def __init__(self, textgenrnn, num_epochs, save_epochs):
      super().__init__()
      self.textgenrnn = textgenrnn
      self.weights_name = textgenrnn.config["name"]
      self.num_epochs = num_epochs
      self.save_epochs = save_epochs
  
imports: import csv
  import re
  from random import shuffle
  import numpy
  from tensorflow.keras import backend
  from tensorflow.keras.callbacks import Callback
  from tensorflow.keras.models import Model
  from tensorflow.keras.preprocessing import sequence
  from tqdm import trange
label_desc: Use image node_id 1 to create a new save_model_weights object from inherited base classes: Callback with example: obj = save_model_weights(textgenrnn, num_epochs, save_epochs)