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: submission_factories.rb
    path of file: ./repos/sequencescape/spec/factories
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

FactoryBot.define do
  factory :submission__ do
    user
    factory :submission_without_order
  end

  factory :submission do
    user
  end

  factory :
    
  def self.submission(options)
    submission_options = {}
    %i[message state].each do |option|
      value = options.delete(option)
      submission_options[option] = value if value
    end
    submission = FactoryBot.create(:order_with_submission, options).submission

    # trying to skip StateMachine
    submission.update!(submission_options) if submission_options.present?
    submission.reload
  end