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: serializer.rb
    path of file: ./repos/phrasing/lib/phrasing
    
    the code of the file until where you have to start completion: module Phrasing
  module Serializer
    class << self

      def import_yaml(yaml)
        number_of_changes = 0
        hash = YAML.load(yaml)

        hash.each do |locale, data|
          flatten_the_hash(data).each do |key, value|
            phrase = PhrasingPhrase.where(key: key, locale: locale)
    
      def import_yaml(yaml)
        number_of_changes = 0
        hash = YAML.load(yaml)

        hash.each do |locale, data|
          flatten_the_hash(data).each do |key, value|
            phrase = PhrasingPhrase.where(key: key, locale: locale).first || PhrasingPhrase.new(key: key, locale: locale)
            if phrase.value != value
              phrase.value = value
              number_of_changes += 1
              phrase.save
            end
          end
        end