code: def get_child(root):
      # print(root)
      if isinstance(root, Node):
          children = root.children
      elif isinstance(root, set):
          children = list(root)
      else:
          children = []
  
      def expand(nested_list):
          for item in nested_list:
              if isinstance(item, list):
                  for sub_item in expand(item):
                      # print(sub_item)
                      yield sub_item
              elif item:
                  # print(item)
                  yield item
  
      return list(expand(children))
  
file_path: amain/get_matrix.py
imports: import numpy
  import javalang
  from javalang.ast import Node
  from anytree import AnyNode
  import time
  import os
  from multiprocessing import Pool
  from functools import partial
label_desc: Use image node_id 4 for calling a global function with example usage: get_child(root) and returns: list