code: def test_serialization():
      x_np, y_np = get_test_data()
      model = get_some_model(x_np, y_np, sanity_check=False)
  
      new_model = clone(model)
  
      assert_all_equal(model.predict(x_np), new_model.predict(x_np))
      assert_all_equal(model.get_weights(), new_model.get_weights())
  
      original_loss = model.train_on_batch(
          x_np, y_np, return_dict=True
      )["crf_loss"]
      clone_loss = new_model.train_on_batch(
          x_np, y_np, return_dict=True
      )["crf_loss"]
      assert_all_equal(model.get_weights(), new_model.get_weights())
      assert original_loss == clone_loss
  
file_path: addons/tensorflow_addons/text/tests/crf_wrapper_test.py
imports: import os
  import tempfile
  import numpy
  import pytest
  import tensorflow
  from tensorflow_addons.text.crf_wrapper import CRFModelWrapper
label_desc: Use image node_id 6 for calling a global function with example usage: test_serialization() without return types