code: def test_node2vec_serialize():
      node2vec = Node2Vec(emb_size=4, node_num=4, multiplicity=2)
  
      inp = keras.Input(shape=(1,))
      out = node2vec(inp, "target")
      model = keras.Model(inputs=inp, outputs=out)
  
      # Save model
      model_json = model.to_json()
  
      # Set all weights to one
      model_weights = [np.ones_like(w) for w in model.get_weights()]
  
      # Load model from json & set all weights
      model2 = keras.models.model_from_json(model_json)
      model2.set_weights(model_weights)
  
      # Test loaded model
      x = np.array([[2]])
      expected = np.array([[1, 1, 1, 1]])
  
      actual = model2.predict(x)
      assert expected == pytest.approx(actual)
  
file_path: stellargraph/tests/layer/test_node2vec.py
imports: from stellargraph.core.graph import StellarGraph
  from stellargraph.mapper import Node2VecNodeGenerator
  from stellargraph.layer.node2vec import *
  from tensorflow import keras
  import numpy
  import pytest
  from ..test_utils.graphs import example_graph
  from ..None import test_utils
label_desc: Use image node_id 3 for calling a global function with example usage: test_node2vec_serialize() without return types