code: def convert_to_undirected_graph(g):
      u = nx.Graph()
      for n in g.nodes:
          u.add_node(n)
      for e in g.edges:
          u.add_edges_from([(e[0], e[1], {})])
      return u
  
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 10 for calling a global function with example usage: convert_to_undirected_graph(g) and returns: u