def METHOD_NAME(tree, child_to_ignore = None):
  q = [(tree['instance_name'], tree['module_name'], tree['instances'])]
  modules = list()
  while len(q) != 0:
    front = q[0]
    q.pop(0)
    (inst, mod, child) = front
    modules.append(mod)
    for c in child:
      if c['module_name'] != child_to_ignore:
        q.append((c['instance_name'], c['module_name'], c['instances']))
  return modules