<｜begin▁of▁sentence｜>### Instruction:
Given a well-known graph (for instance, Zachary's karate club graph), can you simplify it and write the graph to an NCOL file including vertex names and edge weights?
### Response:
import igraph as ig

# Assuming you have a graph `g`
g = ig.Graph.Famous('Zachary')

# Simplify the graph to remove multiple edges and loops if they exist
g = g.simplify()

# Write the graph to an NCOL file
output_file = 'my_graph.ncol'
g.write_ncol(output_file, names='name', weights='weight')
<|EOT|>
