code: def test_negative_length_exception():
      G = nx.cycle_graph(3)
      with pytest.raises(ValueError):
          nx.number_of_walks(G, -1)
  
file_path: networkx/networkx/algorithms/tests/test_walks.py
imports: import pytest
  import networkx
label_desc: Use image node_id 5 for calling a global function with example usage: test_negative_length_exception() without return types