<｜begin▁of▁sentence｜>### Instruction:
Given an Erdos-Renyi graph with 100 nodes and a connection probability of 0.05, can you use SymmNMF model to get both the embeddings and cluster memberships of the nodes?
### Response:
import networkx as nx
from karateclub import SymmNMF

# Create a random graph using networkx
G = nx.erdos_renyi_graph(n=100, p=0.05)

# Initialize the SymmNMF model with default parameters
model = SymmNMF()

# Fit the model on the graph
model.fit(G)

# Retrieve the embeddings
embeddings = model.get_embedding()

# Retrieve the memberships
memberships = model.get_memberships()

# To use, print or analyze the embeddings and memberships
print(embeddings)
print(memberships)
<|EOT|>
