code: def test_neighbors(self):
      G = self.G()
      G.add_nodes_from("GJK")
      G.add_edges_from(
          [("A", "B"), ("A", "C"), ("B", "D"), ("B", "C"), ("C", "D")]
      )
  
      assert sorted(G.neighbors("C")) == ["D"]
      assert sorted(G["C"]) == ["D"]
      assert sorted(G.neighbors("A")) == ["B", "C"]
      pytest.raises(nx.NetworkXError, G.neighbors, "j")
      pytest.raises(nx.NetworkXError, G.neighbors, "j")
  
file_path: networkx/networkx/classes/tests/test_digraph_historical.py
imports: import pytest
  import networkx
  import networkx
  from .historical_tests import HistoricalTests
label_desc: Use image node_id 5 for calling the TestDiGraphHistorical obj's underlying member method code with example usage: obj.test_neighbors() without return types