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: gemspec_declaration_finder.rb
    path of file: ./repos/dependabot-core/bundler/lib/dependabot/bundler/file_parser
    
    the code of the file until where you have to start completion: # typed: false
# frozen_string_literal: true

require "parser/current"
require "dependabot/file_parsers/base"

mo
    
        def declares_targeted_gem?(node, dependency)
          return false unless node.is_a?(Parser::AST::Node)

          second_child = node.children[1]
          allowed_declarations = %i(add_dependency add_runtime_dependency add_development_dependency)
          return false unless allowed_declarations.include?(second_child)

          node.children[2].children.first == dependency.fetch("name")
        end