code: def test_role2vec():
      """
      Testing the Role2Vec class.
      """
      model = Role2Vec()
  
      graph = nx.watts_strogatz_graph(100, 10, 0.5)
  
      model.fit(graph)
  
      embedding = model.get_embedding()
  
      assert embedding.shape[0] == graph.number_of_nodes()
      assert embedding.shape[1] == model.dimensions
      assert type(embedding) == np.ndarray
  
      model = Role2Vec(dimensions=16)
  
      graph = nx.watts_strogatz_graph(200, 10, 0.5)
  
      model.fit(graph)
  
      embedding = model.get_embedding()
  
      assert embedding.shape[0] == graph.number_of_nodes()
      assert embedding.shape[1] == model.dimensions
      assert type(embedding) == np.ndarray
  
imports: import numpy
  import networkx
  from karateclub import Role2Vec, GraphWave
label_desc: Use image node_id 1 for calling a global function with example usage: test_role2vec() without return types