code: def generate_random_graph(n, max_iter=10):
      """
      Function to generate random Directed Acyclic Graph
      :param n: number of nodes in the graph
      :param max_iter: number of iterations to create graph
  
      :returns: Directed Acyclic Graph
      See: https://datascience.oneoffcoder.com/generate-random-bbn.html
      """
      g = get_simple_ordered_tree(n)
      for it in range(max_iter):
          i, j = get_random_node_pair(n)
          if g.has_edge(i, j) is True:
              del_edge(i, j, g)
          else:
              add_edge(i, j, g)
      return g
  
imports: import math
  import string
  import networkx
  import numpy
  import pandas
  import scipy.stats
  from numpy.random import choice
  from scipy.stats import bernoulli, halfnorm, poisson, uniform
  from sklearn.neural_network import MLPRegressor
  from dowhy.utils.graph_operations import add_edge, del_edge, get_random_node_pair, get_simple_ordered_tree
label_desc: Use image node_id 13 for calling a global function with example usage: generate_random_graph(n, max_iter) and returns: g