module Dry::Schema::Extensions::Hints::MessageSetMethods

def initialize_placeholders!

Other tags:
    Api: - private
def initialize_placeholders!
  @placeholders = unique_paths.each_with_object(EMPTY_HASH.dup) { |path, hash|
    curr_idx = 0
    last_idx = path.size - 1
    node = hash
    while curr_idx <= last_idx
      key = path[curr_idx]
      next_node =
        if node.is_a?(Array) && key.is_a?(Symbol)
          node_hash = (node << [] << {}).last
          node_hash[key] || (node_hash[key] = curr_idx < last_idx ? {} : [])
        else
          node[key] || (node[key] = curr_idx < last_idx ? {} : [])
        end
      node = next_node
      curr_idx += 1
    end
  }
end