code: def get_prop_order(root):
      queue = deque([root])
      visited = set([root.idx])
      root.depth = 0
      order1, order2 = [], []
      while len(queue) > 0:
          x = queue.popleft()
          for y in x.neighbors:
              if y.idx not in visited:
                  queue.append(y)
                  visited.add(y.idx)
                  y.depth = x.depth + 1
                  if y.depth > len(order1):
                      order1.append([])
                      order2.append([])
                  order1[y.depth - 1].append((x, y))
                  order2[y.depth - 1].append((y, x))
      order = order2[::-1] + order1
      return order
  
file_path: DIG/dig/ggraph/method/JTVAE/fast_jtnn/jtnn_enc_bo.py
imports: import torch
  import torch.nn
  from collections import deque
  from .nnutils import create_var, GRU
label_desc: Use image node_id 1 for calling a global function with example usage: get_prop_order(root) and returns: order