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

# Search for milestones
#
# params - Hash
#   ids - filters by id.
#   project_ids: Array of project ids or single project id or ActiveRecord relation
    
  def by_ids_or_title(items)
    return items if params[:ids].blank? && params[:title].blank?
    return items.id_in(params[:ids]) if params[:ids].present? && params[:title].blank?
    return items.with_title(params[:title]) if params[:ids].blank? && params[:title].present?

    items.with_ids_or_title(ids: params[:ids], title: params[:title])
  end