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: declares_dry_class.rb
    path of file: ./repos/mocktail/src/mocktail/imitates_type/makes_double
    
    the code of the file until where you have to start completion: # typed: strict

require_relative "declares_dry_class/reconstructs_call"

module Mocktail
  class DeclaresDryClass
    extend T::Sig

    DEFAULT_ANCESTORS = T.let
    
    def declare(type, instance_methods)
      dry_class = Class.new(Object) {
        include type if T.unsafe(type).is_a?(Module) && !T.unsafe(type).is_a?(Class)

        define_method :initialize do |*args, **kwargs, &blk|
        end

        [:is_a?, :kind_of?].each do |method_name|
          define_method method_name, ->(thing) {
            # Mocktails extend from Object, so share the same ancestors, plus the passed type
            [type, *DEFAULT_ANCESTORS].include?(thing)
          }
        end

        if T.unsafe(type).is_a?(Class)
          define_method :instance_of?, ->(thing) {
            type == thing
          }
        end