You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: traversal.rb
    path of file: ./repos/oga/lib/oga/xml
    
    the code of the file until where you have to start completion: module Oga
  module XML
    # Module that provides methods to traverse DOM trees.
    module Traversal
      # Trav
    
      def each_node
        return to_enum(:each_node) unless block_given?

        visit = children.to_a.reverse

        until visit.empty?
          current = visit.pop

          catch :skip_children do
            yield current

            current.children.to_a.reverse_each do |child|
              visit << child
            end
          end
        end