code: def test_trophic_levels_simple():
      matrix_a = np.array([[0, 0], [1, 0]])
      G = nx.from_numpy_array(matrix_a, create_using=nx.DiGraph)
      d = nx.trophic_levels(G)
      assert d[0] == pytest.approx(2, abs=1e-7)
      assert d[1] == pytest.approx(1, abs=1e-7)
  
file_path: networkx/networkx/algorithms/centrality/tests/test_trophic.py
imports: import pytest
  import networkx
label_desc: Use image node_id 3 for calling a global function with example usage: test_trophic_levels_simple() without return types