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: aliases.rb
    path of file: ./repos/chewy/lib/chewy/index
    
    the code of the file until where you have to start completion: module Chewy
  class Index
    module Aliases
      extend ActiveSupport::Concern

      module ClassMethods
        def indexes
          indexes = empty_if_not_found { client.indices.get(index: index_name).keys }
          indexes += empty
    
        def aliases
          empty_if_not_found do
            client.indices.get_alias(index: index_name, name: '*').values.flat_map do |aliases|
              aliases['aliases'].keys
            end
          end.compact.uniq
        end

      private

        def empty_if_not_found
          yield
        rescue Elasticsearch::Transport::Transport::Errors::NotFound
          []
        end
      end