<｜begin▁of▁sentence｜>### Instruction:
Imagine we're setting up for a brand-new wildlife documentary, and we've compiled an intricate storyboard that visualizes the food web of our featured ecosystem. In this storyboard, which is akin to our own director's graphical layout, each creature is depicted by a node. These nodes are linked with arrows indicating the flow of energy in our ecosystem—the direction of the arrow goes from the meal to the diner, if you catch my drift.

Now, here's the cinematic challenge: We want to assign each of our cast members — from the lowly plants to the apex predators — their position in the hierarchy of our ecological plot. This ranking, or "trophic level," starts with our green plant friends at the foundational level labeled as 1. Subsequently, as we ascend through the cast, each level represents a step further from the plant life that paints the backdrop of our stage. The key here is to figure out the degree of separation between our organisms and the autotrophic originals.

What we need is a technique, mirroring the editing process, that parses our storyboard (which, by the way, is meticulously archived in a file named 'ecosystem.gml') to assign these trophic ranks. How can we accurately cut and splice our ecological footage to ensure that each creature's role is properly defined by its trophic level within this natural drama?
### Response:
import networkx as nx

# Create a directed graph
digraph = nx.DiGraph()

# Add nodes and edges to the graph
digraph.add_node(1, label='Producer')
digraph.add_node(2, label='Primary Consumer')
digraph.add_node(3, label='Secondary Consumer')
digraph.add_edge(1, 2, label='eats')
digraph.add_edge(2, 3, label='eats')

# Compute the trophic levels of the nodes
levels = nx.trophic_levels(digraph)

# Print the trophic levels
for node, level in levels.items():
    print(f'Node {node}, Trophic Level: {level}')
<|EOT|>
