<｜begin▁of▁sentence｜>### Instruction:
As a digital artist creating a visualization project for a social network analysis tool, you need to apply the BigClam model from the KarateClub library to detect overlapping communities in a given karate club graph from the NetworkX library. Once the model is fitted, you should obtain the embeddings and memberships of the graph nodes for further visualization and analysis in your project. This will provide insights into the network's community structure and help in creating compelling visualizations.
### Response:
import networkx as nx
from karateclub import BigClam

# Create a sample graph
G = nx.karate_club_graph()

# Initialize the BigClam model
model = BigClam(dimensions=8, iterations=50, learning_rate=0.005, seed=42)

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

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

# Output the result
print('Embeddings:', embeddings)
print('Memberships:', memberships)
<|EOT|>
