code: def make_or_restore_model():
      # Either restore the latest model, or create a fresh one
      # if there is no checkpoint available.
      checkpoints = [
          checkpoint_dir + "/" + name
          for name in os.listdir(checkpoint_dir)
      ]
      if checkpoints:
          latest_checkpoint = max(checkpoints, key=os.path.getctime)
          print("Restoring from", latest_checkpoint)
          return keras.models.load_model(latest_checkpoint)
      print("Creating a new model")
      return get_compiled_model()
  
imports: import torch
  import tensorflow
  import os
  import numpy
  import keras
  from keras import layers
  from keras import ops
label_desc: Use image node_id 4 for calling a global function with example usage: make_or_restore_model() and returns: get_compiled_model, keras