<｜begin▁of▁sentence｜>### Instruction:
Given a social network graph where nodes represent members of a karate club and edges represent interactions between them, with the adjacency matrix 'X' of the graph and optional node labels 'labels', how can we visualize the distribution of interaction weights using the 'edgeplot' function from the graspologic library?
### Response:
import numpy as np
import matplotlib.pyplot as plt
from graspologic.plot import edgeplot
import networkx as nx

# Create a graph
G = nx.karate_club_graph()

# Generate the adjacency matrix
X = nx.to_numpy_array(G)

# Optionally, get the labels for each node
labels = [G.nodes[n]['club'] for n in G.nodes]

# Generate edgeplot
ax = edgeplot(X, labels=labels, nonzero=True, title='Karate Club Edge Weight Distribution', context='talk', font_scale=1.2, figsize=(12, 8), palette='Set3')
plt.show()
<|EOT|>
