<｜begin▁of▁sentence｜>### Instruction:
Given a simple undirected graph with edge set [(0, 1), (0, 2), (1, 2), (2, 3)], can you generate an LGL file representing the graph, ensuring that it is appropriately simplified to avoid multiple edges or loops?
### Response:
import igraph as ig

# Create a simple example graph.
edges = [(0, 1), (0, 2), (1, 2), (2, 3)]
g = ig.Graph(edges=edges)

# Simplify to eliminate multiple edges and loops if they exist.
g.simplify()

# Write graph to an LGL file.
g.write_lgl('example_graph.lgl')
<|EOT|>
