lib/praxis-mapper/identity_map.rb
def finalize!(*models_and_opts)

      models, instrument = if models_and_opts.last.kind_of?(::Hash)
        ins = models_and_opts.last.fetch(:instrument) do
          true
        end
        [ models_and_opts[0..-2], ins ]
      else
        [ models_and_opts, true ]
      end

      if instrument
        ActiveSupport::Notifications.instrument 'praxis.mapper.finalize' do
          _finalize!(*models)
        end
      else
        _finalize!(*models)
      end
    end
def finalize!(*models_and_opts)

      models, instrument = if models_and_opts.last.kind_of?(::Hash)
        ins = models_and_opts.last.fetch(:instrument) do
          true
        end
        [ models_and_opts[0..-2], ins ]
      else
        [ models_and_opts, true ]
      end

      if instrument
        ActiveSupport::Notifications.instrument 'praxis.mapper.finalize' do
          _finalize!(*models)
        end
      else
        _finalize!(*models)
      end
    end
Last parameter in array can be a hash of objects
 It is implemented this way (instead of (*models, instrument: true)) because when passing in
 Sequel models, ruby will invoke the ".to_hash" on them, causing a "load" when trying to restructure the args