<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with nodes 1 through 5 and directed edges from every node n to n+1, what are the predecessors of each node during a depth-first search starting from node 1 and limiting the search depth to 3?
### Response:
import networkx as nx

# Create a graph
G = nx.digraph([(1, 2), (2, 3), (3, 4), (4, 5)])

# Run DFS, specifying a source node and a depth limit
predecessors = nx.dfs_predecessors(G, source=1, depth_limit=3)

print('DFS predecessors:', predecessors)
<|EOT|>
