code: def test_directed_edge_swap_tries():
      with pytest.raises(nx.NetworkXError):
          G = nx.directed_edge_swap(
              nx.path_graph(3, create_using=nx.DiGraph),
              nswap=1,
              max_tries=0,
          )
  
imports: import pytest
  import networkx
label_desc: Use image node_id 10 for calling a global function with example usage: test_directed_edge_swap_tries() without return types