<｜begin▁of▁sentence｜>### Instruction:
Given a simple tree graph created with 5 vertices in a 2-ary tree structure, can you use the `write_dot` function to output this graph in DOT format to a specified file named 'tree_graph.dot'?
### Response:
from igraph import Graph

# Create a simple graph
g = Graph.Tree(5, 2)

# Write the graph to dot format
file_path = 'tree_graph.dot'
g.write_dot(file_path)
print(f'Graph written to {file_path}')
<|EOT|>
