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: name.rb
    path of file: ./repos/mushroom-observer/app/classes/pattern_search
    
    the code of the file until where you have to start completion: # frozen_string_lite
    
    def build_query
      super

      # Temporary hack to get include_subtaxa/synonyms to work.
      # Will rip out when we do away with pattern search query flavor.
      if flavor == :pattern_search &&
         (!args[:include_subtaxa].nil? || !args[:include_synonyms].nil?)
        self.flavor = :all
        args[:names] = args[:pattern]
        args.delete(:pattern)
      end
    end