<｜begin▁of▁sentence｜>### Instruction:
Given a tree graph with edges defined as (0, 1), (0, 2), (1, 3), (1, 4), can you use Graph.to_prufer function to convert the tree into a Prüfer sequence?
### Response:
from igraph import Graph

# Create a graph
edges = [(0, 1), (0, 2), (1, 3), (1, 4)]
graph = Graph(edges=edges)

# Ensure the graph is a tree
assert graph.is_tree(), 'The graph must be a tree to convert to a Prüfer sequence.'

# Convert to Prüfer sequence
prufer_sequence = graph.to_prufer()
print('Prüfer sequence:', prufer_sequence)
<|EOT|>
