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: latin_gen.rb
    path of file: ./repos/whatlang-rs/misc/alphabets
    
    the code of the file until where you have to start completion: require 'yaml'

def normalize_alphabet(alphabet)
  alphabet.downcase
    .chars

    
def load_alphabets
  alphabets = {}
  data = YAML.load_file("./raw_latin.yml")

  latin_based = data["latin_based"]
  base = latin_based.delete("base")

  latin_based.each do |code, alphabet|
    alphabet = base + alphabet
    alphabet = normalize_alphabet(alphabet)
    alphabets[code] = alphabet
  end

  data["others"].each do |code, alphabet|
    alphabets[code] = normalize_alphabet(alphabet)
  end

  alphabets.sort_by {|k, _| k }.to_h
end