code: def test_directed_edge_max_tries():
      with pytest.raises(nx.NetworkXAlgorithmError):
          G = nx.directed_edge_swap(
              nx.complete_graph(4, nx.DiGraph()), nswap=1, max_tries=5
          )
  
imports: import pytest
  import networkx
label_desc: Use image node_id 12 for calling a global function with example usage: test_directed_edge_max_tries() without return types