<｜begin▁of▁sentence｜>### Instruction:
Given graph G as a path with 5 nodes, can you generate a depth-first search tree starting from the source node 0 and print the edges of that tree?
### Response:
import networkx as nx

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

# Generate a DFS tree from the graph starting from source node 0
T = nx.dfs_tree(G, source=0)

# Print the edges of the DFS tree
print(list(T.edges()))
<|EOT|>
