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: sessions_controller.rb
    path of file: ./repos/identity-idp/app/controllers/idv
    
    the code of the file until where you have to start completion: module Idv
  class SessionsController < ApplicationController
    include Idv::Availabili
    
    def extra_analytics_attributes
      extra = {}
      if barcode_step? && enrollment
        extra.merge!(
          cancelled_enrollment: true,
          enrollment_code: enrollment.enrollment_code,
          enrollment_id: enrollment.id,
        )
      end