code: def test_tree_isomorphism_raises_on_directed_and_multigraphs(
      graph_constructor,
  ):
      t1 = graph_constructor([(0, 1)])
      t2 = graph_constructor([(1, 2)])
      with pytest.raises(nx.NetworkXNotImplemented):
          nx.isomorphism.tree_isomorphism(t1, t2)
  
file_path: networkx/networkx/algorithms/isomorphism/tests/test_tree_isomorphism.py
imports: import random
  import time
  import pytest
  import networkx
  from networkx.algorithms.isomorphism.tree_isomorphism import rooted_tree_isomorphism, tree_isomorphism
  from networkx.classes.function import is_directed
label_desc: Use image node_id 1 for calling a global function with example usage: test_tree_isomorphism_raises_on_directed_and_multigraphs(graph_constructor) without return types