public function pop_group($levels = 1) { for ($i = 0; $i < $levels; $i++) { $this->target_node = $this->target_node->get_parent(); } }