code: def update_self_and_descendants_depth
        if depth?
          scope_class.each_with_level(self_and_descendants) do |node, level|
            node.with(:safe => true).set(:depth, level) unless node.depth == level
          end
          self.reload
        end
        self
      end
docs: Update cached level attribute for self and descendants