code: def test_directed_exception_undirected():
      graph = nx.Graph([(0, 1), (2, 3)])
      with pytest.raises(nx.NetworkXNotImplemented):
          G = nx.directed_edge_swap(graph)
  
imports: import pytest
  import networkx
label_desc: Use image node_id 11 for calling a global function with example usage: test_directed_exception_undirected() without return types