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: spy.rb
    path of file: ./repos/wor-authentication/spec
    
    the code of the file until where you have to start completion: #
# Class used in tests to keep track of 
    
  def self.define_counter(klass, method)
    klass.instance_variable_set("@spied_#{method}_counter".to_sym, 0)

    klass.singleton_class.class_eval do
      define_method("spied_#{method}_counter".to_sym) do
        instance_variable_get("@spied_#{method}_counter")
      end
    end
  end