code: def test_directed():
      G = nx.DiGraph([(0, 1), (1, 2), (2, 0)])
      num_walks = nx.number_of_walks(G, 3)
      expected = {
          0: {0: 1, 1: 0, 2: 0},
          1: {0: 0, 1: 1, 2: 0},
          2: {0: 0, 1: 0, 2: 1},
      }
      assert num_walks == expected
  
file_path: networkx/networkx/algorithms/tests/test_walks.py
imports: import pytest
  import networkx
label_desc: Use image node_id 1 for calling a global function with example usage: test_directed() without return types