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: clean_html.rb
    path of file: ./repos/devdocs/lib/docs/filters/codeception
    
    the code of the file until where you have to start completion: module Docs
  class Codeception
    class CleanHtmlFilter < Filter
      def call
        @doc = doc.at_css('#page')

        css('.algolia__search-content').remove

        css('.algolia__initial-content').each do |node|
          node.before(node.children).remove
        end

        while doc.element_children.length == 1
          doc.first_element
    
      def call
        @doc = doc.at_css('#page')

        css('.algolia__search-content').remove

        css('.algolia__initial-content').each do |node|
          node.before(node.children).remove
        end

        while doc.element_children.length == 1
          doc.first_element_child.before(doc.first_element_child.children).remove
        end

        if root_page?
          at_css('h1').content = 'Codeception Documentation'
        end

        unless at_css('h1')
          at_css('h2').name = 'h1'
        end