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: fragment_spreads_are_possible.rb
    path of file: ./repos/graphql-ruby/lib/graphql/static_validation/rules
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
module GraphQL
  module StaticValidation
    module FragmentSpreadsArePossible
      def initialize(*)
        super
        @spreads_to_validate = []
      end

      def on_inline_fragment(node, parent)
      
    
      def on_document(node, parent)
        super
        @spreads_to_validate.each do |frag_spread|
          frag_node = context.fragments[frag_spread.node.name]
          if frag_node
            fragment_child_name = frag_node.type.name
            fragment_child = context.warden.get_type(fragment_child_name)
            # Might be non-existent type name
            if fragment_child
              validate_fragment_in_scope(frag_spread.parent_type, fragment_child, frag_spread.node, context, frag_spread.path)
            end
          end