<｜begin▁of▁sentence｜>### Instruction:
Given a karate_club_graph, can you use the Role2Vec model, from the IJCAI ‘18 paper “Learning Role-based Graph Embeddings”, to generate the structural node embeddings?
### Response:
import networkx as nx
from karateclub import Role2Vec

# Creating a graph
G = nx.karate_club_graph()

# Role2Vec embedding
model = Role2Vec(walk_number=10, walk_length=80, dimensions=128, workers=4, window_size=2,
                epochs=1, learning_rate=0.05, down_sampling=0.0001, min_count=10,
                wl_iterations=2, seed=42, erase_base_features=False)
model.fit(G)

# Getting the embeddings
embeddings = model.get_embedding()
print(embeddings)
<|EOT|>
