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: movies_discovery_worker.rb
    path of file: ./repos/muvee/app/workers
    
    the code of the file until where you have to start completion: class MoviesDiscoveryWorker
  include Sidekiq::Worker
  sidekiq_options queue: :movies_discovery, retry: false

  def perform

    
  def query(page)
    remote_movies = KickassTorrentsListResult.get(page).results
    return 'error' if remote_movies.blank?

    remote_movies = remote_movies.select{ |r| r[:verified] }
    return 'error' if remote_movies.blank?

    results = []

    remote_movies.each do |m|
      guessed = Guesser::Movie.guess_from_string(m[:title])
      movie = Movie.new(
        title: guessed[:title],
        status: 'remote'
      )
      movie.imdb_id = movie.search_for_imdb_id

      if movie.imdb_id.present?
        movie.save
        results << movie.persisted?
      end
    end