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: asset_group_behaviour.rb
    path of file: ./repos/sequencescape/app/models/submission
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
module Submission::AssetGroupBehaviour
  def self.included(base)
    base.class_eval do
      belongs_to :asset_group
      before_create :find_asset_group, unless: :asset_group?

    
  def self.included(base)
    base.class_eval do
      belongs_to :asset_group
      before_create :find_asset_group, unless: :asset_group?
      before_create :pull_assets_from_asset_group, if: :asset_group?

      # Required once out of the building state ...
      validates :assets, presence: { if: :assets_need_validating? }
    end
  end