code: def get_simple_ordered_tree(n):
      """
      Generates a simple-ordered tree. The tree is just a
      directed acyclic graph of n nodes with the structure
      0 --> 1 --> .... --> n.
      """
      g = nx.DiGraph()
  
      for i in range(n):
          g.add_node(i)
  
      for i in range(n - 1):
          g.add_edges_from([(i, i + 1, {})])
      return g
  
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 8 for calling a global function with example usage: get_simple_ordered_tree(n) and returns: g