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

module Ci
  class UnitTest < Ci::ApplicationRecord
    MAX_NAME_SIZE = 255
    MAX_SUITE_NAME_SIZE = 255

    validates :project, :key_hash, :name, :suite_na
    
      def find_or_create_by_batch(project, unit_test_attrs)
        # Insert records first. Existing ones will be skipped.
        insert_all(build_insert_attrs(project, unit_test_attrs))

        # Find all matching records now that we are sure they all are persisted.
        by_project_and_keys(project, gather_keys(unit_test_attrs))
      end