code: def test_single_target_shortest_path_length(self):
      pl = nx.single_target_shortest_path_length
      lengths = {0: 0, 1: 1, 2: 2, 3: 3, 4: 3, 5: 2, 6: 1}
      assert pl(self.cycle, 0) == lengths
      lengths = {0: 0, 1: 6, 2: 5, 3: 4, 4: 3, 5: 2, 6: 1}
      assert pl(self.directed_cycle, 0) == lengths
      # test missing targets
      target = 8
      with pytest.raises(
          nx.NodeNotFound, match=f"Target {target} is not in G"
      ):
          nx.single_target_shortest_path_length(self.cycle, target)
  
file_path: networkx/networkx/algorithms/shortest_paths/tests/test_unweighted.py
imports: import pytest
  import networkx
label_desc: Use image node_id 8 for calling the TestUnweightedPath obj's underlying member method code with example usage: obj.test_single_target_shortest_path_length() without return types