def final_definitions
      parent_definitions = Hash(parent&.definitions&.dup)
      definitions.each_with_object(parent_definitions) do |(key, val), obj|
        obj[key] = check_type(obj[key], val)
      end
    end
def final_definitions
      parent_definitions = Hash(parent&.definitions&.dup)
      definitions.each_with_object(parent_definitions) do |(key, val), obj|
        obj[key] = check_type(obj[key], val)
      end
    end
rubocop: enable Metrics/MethodLength