code: def get_child_types(tree):
      
      child_types = defaultdict(list)
      for i, child in enumerate(tree):
          child_types[get_tree_type(child)].append(i)
      return child_types
docs: Take a tree and check what types of children (i.e. 'nucleus' or
      'satellite') it has. Returns a map from child tree type to the indices of
      all children with that type.