code: def test_trophic_levels():
      """Trivial example"""
      G = nx.DiGraph()
      G.add_edge("a", "b")
      G.add_edge("b", "c")
  
      d = nx.trophic_levels(G)
      assert d == {"a": 1, "b": 2, "c": 3}
  
file_path: networkx/networkx/algorithms/centrality/tests/test_trophic.py
imports: import pytest
  import networkx
label_desc: Use image node_id 1 for calling a global function with example usage: test_trophic_levels() without return types