code: def test_reproducible_predictions_restored_model():
      X = np.array(
          [
              ["a", "x", "b"],
              ["a", "y", "c"],
              ["a", "y", "d"],
              ["a", "x", "e"],
              ["e", "x", "b"],
              ["b", "y", "d"],
              ["c", "x", "e"],
          ]
      )
  
      model = ScoringBasedEmbeddingModel(
          k=50, eta=1, scoring_type="TransE", seed=0
      )
      adam = tf.keras.optimizers.Adam(learning_rate=0.001)
      loss = PairwiseLoss(loss_params={"margin": 0.5})
      model.compile(
          optimizer=adam,
          loss=loss,
          entity_relation_initializer="glorot_uniform",
          entity_relation_regularizer="L2",
      )
      model.fit(X, batch_size=10, epochs=5, verbose=True)
  
      save_model(model, "test_reproducible_predictions_restored_model")
  
      model_restored = restore_model(
          model_name_path="test_reproducible_predictions_restored_model"
      )
  
      assert (
          model_restored.predict(X[:2,])
          == np.array([-2.2272136, -2.429057], dtype=np.float32).all(),
          "Prediction scores from restored model do not match the originals",
      )
  
file_path: AmpliGraph/tests/ampligraph/latent_features/layers/test_predictions.py
imports: import tensorflow
  import numpy
  from ampligraph.datasets import load_fb15k_237
  from ampligraph.latent_features import ScoringBasedEmbeddingModel
  from ampligraph.latent_features import PairwiseLoss
  from ampligraph.utils import save_model, restore_model
label_desc: Use image node_id 3 for calling a global function with example usage: test_reproducible_predictions_restored_model() without return types