<｜begin▁of▁sentence｜>### Instruction:
Given a Newman-Watts-Strogatz small-world graph with 100 nodes, each connected to nearest neighbors in a ring topology with 3 edges per node (k=3) and with the probability of adding a new edge for each edge (p=0.5), how can you detect communities using the EdMot model based on higher order motifs, and what are the resulting cluster memberships?
### Response:
import networkx as nx
from karateclub import EdMot

# Step 1: Create a graph
G = nx.newman_watts_strogatz_graph(100, 3, 0.5)

# Step 2: Apply the EdMot model
edmot_model = EdMot(component_count=2, cutoff=50, seed=42)
edmot_model.fit(G)

# Step 3: Get the memberships
memberships = edmot_model.get_memberships()

print(memberships)
<|EOT|>
