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: course_city_filter.rb
    path of file: ./repos/avo/spec/dummy/app/avo/filters
    
    the code of the file until where you have to start completion: class Avo::Filters::CourseCityFilter < Avo::Filters::BooleanFilter
  
    
  def cities_for_countries(countries_array = [])
    countries_array
      .map do |country|
        # Get the cities for this country
        Course.cities.stringify_keys[country]
      end
      .flatten
      .map { |city| [city, city] } # Prepare to transform to a Hash
      .to_h # Turn to a Hash
  end