<｜begin▁of▁sentence｜>### Instruction:
Given a linear path graph with 5 nodes, can you use the dfs_edges function from NetworkX to perform a depth-first search starting from node 0 and list all the edges visited in order?
### Response:
import networkx as nx

# Create a graph
G = nx.path_graph(5)

# Perform DFS with a specified source
edges_from_dfs = list(nx.dfs_edges(G, source=0))

print(edges_from_dfs)
<|EOT|>
