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: timecard.rb
    path of file: ./repos/ReadyResponder/app/models
    
    the code of the file until where you have to start completion: class Timecard < ApplicationRecord
  has_paper_
    
  def find_duplicate_timecards
    margin = 30
    query = Timecard.where(person_id: self.person_id)
    if self.intended_start_time.is_a?(Time) && self.intended_end_time.is_a?(Time)
      true_start = self.intended_start_time
      fuzzy_start = (self.intended_start_time - margin.minutes)
      fuzzy_end = (self.intended_end_time + margin.minutes)
      query = query.where('(? > intended_start_time AND ? < intended_end_time) OR (intended_start_time BETWEEN ? AND ?)',
                                                  true_start,fuzzy_start, fuzzy_start, fuzzy_end)
    end