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: miq_request.rb
    path of file: ./repos/manageiq/app/models
    
    the code of the file until where you have to start completion: class MiqRequest < ApplicationRecord
  extend InterRegionApiMethodRelay

  ACTIVE_STATES = %w[active queued]
  REQUEST_UNIQUE_KEYS = %w[id state status created_on updated_on type].freeze

  CANCEL_STATUS_REQUESTED  = "cancel_requested".freeze
  CANCEL_STATUS_PROCESSING = "can
    
  def create_request_task(idx)
    req_task_attribs = clean_up_keys_for_request_task

    customize_request_task_attributes(req_task_attribs, idx)
    req_task = self.class.new_request_task(req_task_attribs)
    req_task.miq_request = self

    yield req_task if block_given?

    req_task.save!
    req_task.after_request_task_create

    req_task
  end