<｜begin▁of▁sentence｜>### Instruction:
As a leisure travel agent, imagine you have a customer who wants to plan a group trip to a few destinations. You have a list of connections between the destinations, represented by edges, and each destination has been categorized into different clusters. Using the VertexClustering constructor in the networkx library, you need to create a clustering based on the given cluster membership information, and then retrieve the subgraphs representing the clusters to organize the travel itinerary effectively.
### Response:
import igraph as ig

# Suppose we have a graph with 4 vertices
# and we know their cluster memberships
g = ig.Graph(edges=[(0, 1), (2, 3)])

# Define membership of each vertex
membership = [0, 0, 1, 1]

# Create a VertexClustering object with the memberships
clustering = ig.VertexClustering(g, membership=membership)

# Now we can work with clustering object, e.g., get the clusters
clusters = clustering.subgraphs()

# Print the clusters
for cluster in clusters:
    print(cluster)
<|EOT|>
