code: def del_edge(i, j, g):
      """
      Deletes the edge i --> j in the graph, g. The edge is only
      deleted if this removal does NOT cause the graph to be
      disconnected.
      """
      if g.has_edge(i, j) is True:
          g.remove_edge(i, j)
  
          if is_connected(g) is False:
              g.add_edges_from([(i, j, {})])
  
imports: import re
  from queue import LifoQueue
  import networkx
  import numpy
  from networkx.algorithms.dag import is_directed_acyclic_graph
  from networkx.algorithms.shortest_paths.generic import shortest_path
  from dowhy.utils.ordered_set import OrderedSet
label_desc: Use image node_id 13 for calling a global function with example usage: del_edge(i, j, g) without return types