<｜begin▁of▁sentence｜>### Instruction:
Given a Newman-Watts-Strogatz small-world graph with 100 nodes and each node connected to its 3 nearest neighbors in a ring topology, with a probability of 0.5 for adding a new edge, can you use the BigClam model to get the node embedding and their cluster memberships?
### Response:
import networkx as nx
from karateclub import BigClam

# Create a synthetic graph
G = nx.newman_watts_strogatz_graph(100, 3, 0.5)

# Initialize the BigClam model
model = BigClam(dimensions=10, iterations=100, learning_rate=0.01, seed=90)

# Fit the model
model.fit(G)

# Get the embedding and memberships
embedding = model.get_embedding()
memberships = model.get_memberships()

print('Embedding:', embedding)
print('Memberships:', memberships)
<|EOT|>
