def expand_sub_definitions(sub_definitions)
      sub_definitions.each_with_object({}) do |(subkey, value), result|
        result[subkey] = value
        next if value.respond_to? :call
        result[subkey][:attributes] = expand_definition(value[:attributes])
      end
    end
def expand_sub_definitions(sub_definitions)
      sub_definitions.each_with_object({}) do |(subkey, value), result|
        result[subkey] = value
        next if value.respond_to? :call
        result[subkey][:attributes] = expand_definition(value[:attributes])
      end
    end
expands nested simple definition into a full hash
 @api private
 @param definition [Hash]
 @return [Hash]