code: def test_entity_relation_hyperparameters():
      """test the getters and setters of entity relation hyperparams"""
      adam = optimizers.get(Adam(learning_rate=0.0001))
      ent = tf.Variable(
          np.array([[1, 2], [3, 4]], dtype=np.float32), trainable=True
      )
      rel = tf.Variable(
          np.array([[1, 2], [3, 4]], dtype=np.float32), trainable=True
      )
  
      with tf.GradientTape() as tape:
          loss = tf.reduce_sum(ent * rel)
  
      adam.minimize(loss, ent, rel, tape)
  
      curr_weights = adam.get_weights()
      ent_hyp, rel_hyp = adam.get_entity_relation_hyperparams()
  
      assert (curr_weights[1] == ent_hyp[0]).all() and (
          curr_weights[3] == ent_hyp[1]
      ).all(), "ent weights are not correct!"
      assert (curr_weights[2] == rel_hyp[0]).all() and (
          curr_weights[4] == rel_hyp[1]
      ).all(), "rel weights are not correct!"
  
file_path: AmpliGraph/tests/ampligraph/latent_features/test_optimizers.py
imports: from ampligraph.latent_features import optimizers
  import pytest
  import tensorflow
  import numpy
  from tensorflow.keras.optimizers import Adagrad, Adam
label_desc: Use image node_id 3 for calling a global function with example usage: test_entity_relation_hyperparameters() without return types