code: def load_bulk(cls, bulk_data, parent=None, keep_ids=False):
          
  
          cls = get_result_class(cls)
  
          # tree, iterative preorder
          added = []
          if parent:
              parent_id = parent.pk
          else:
              parent_id = None
          # stack of nodes to analize
          stack = [(parent_id, node) for node in bulk_data[::-1]]
          foreign_keys = cls.get_foreign_keys()
          while stack:
              parent_id, node_struct = stack.pop()
              # shallow copy of the data strucure so it doesn't persist...
              node_data = node_struct['data'].copy()
              cls._process_foreign_keys(foreign_keys, node_data)
              if keep_ids:
                  node_data['id'] = node_struct['id']
              if parent_id:
                  parent = cls.objects.get(pk=parent_id)
                  node_obj = parent.add_child(**node_data)
              else:
                  node_obj = cls.add_root(**node_data)
              added.append(node_obj.pk)
              if 'children' in node_struct:
                  # extending the stack with the current node as the parent of
                  # the new nodes
                  stack.extend([
                      (node_obj.pk, node)
                      for node in node_struct['children'][::-1]
                  ])
          return added
docs: Loads a list/dictionary structure to the tree.