code: def test_implementations_consistent(strings):
      """Ensure results are consistent between prefix_tree implementations."""
      assert graphs_equal(
          nx.prefix_tree(strings), nx.prefix_tree_recursive(strings)
      )
  
file_path: networkx/networkx/generators/tests/test_trees.py
imports: import random
  import pytest
  import networkx
  from networkx.utils import arbitrary_element, graphs_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_implementations_consistent(strings) without return types