<｜begin▁of▁sentence｜>### Instruction:
Given a synthetic graph generated by the GNP random graph model with 100 nodes and a probability of edge creation of 0.05, can you use the GEMSEC model to generate node embeddings and determine cluster memberships of the nodes?
### Response:
import networkx as nx
from karateclub import GEMSEC

# Generating a synthetic graph
G = nx.gnp_random_graph(100, 0.05)

# Creating a GEMSEC model
model = GEMSEC(walk_number=10, walk_length=80, dimensions=32, negative_samples=10, 
              window_size=5, learning_rate=0.1, clusters=5, gamma=0.1, seed=42)

# Fit the model
model.fit(G)

# Get the embeddings
embedding = model.get_embedding()

# Get the cluster memberships
memberships = model.get_memberships()

print('Embeddings:\n', embedding)
print('Memberships:\n', memberships)
<|EOT|>
