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: merged_at_filter.rb
    path of file: ./repos/gitlabhq/app/finders/concerns
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module MergedAtFilter
  private

  def by_merged_a
    
  def by_merged_at(items)
    return items unless merged_after || merged_before

    mr_metrics_scope = MergeRequest::Metrics
    mr_metrics_scope = mr_metrics_scope.merged_after(merged_after) if merged_after.present?
    mr_metrics_scope = mr_metrics_scope.merged_before(merged_before) if merged_before.present?

    items.join_metrics.merge(mr_metrics_scope)
  end