<｜begin▁of▁sentence｜>### Instruction:
Given a graph with the edges (1, 2) and (2, 3), how would you use the provided decorator to write the adjacency list of the graph to a file named 'my_graph.adjlist'?
### Response:
import networkx as nx

@nx.utils.open_file(1, 'w')
def write_graph_to_file(G, path):
    nx.write_adjlist(G, path)

# Create a simple graph
G = nx.Graph()
G.add_edges_from([(1, 2), (2, 3)])

# Write the graph to a file
destination_path = 'my_graph.adjlist'
write_graph_to_file(G, destination_path)
<|EOT|>
