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: utils.rb
    path of file: ./repos/carmen/lib/carmen
    
    the code of the file until where you have to start completion: module Carmen
  module Utils
    # Merge an array of hashes deeply.
    #
    # When a conflict occurs:
    #   - if both the old value and the new value respond_to? :merge, they
    #   are recursively passed to deep_merge_hash and the result used
    
    def self.deep_hash_merge(hashes)
      return hashes.first if hashes.size == 1

      hashes.inject { |acc, hash|
        acc.merge(hash) { |key, old_value, new_value|
          if old_value.respond_to?(:merge) && new_value.respond_to?(:merge)
            deep_hash_merge([old_value, new_value])
          else
            new_value || old_value
          end