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: first_run.rb
    path of file: ./repos/ekylibre/lib/ekylibre
    
    the code of the file until where you have to start completion: require 'zip'

module Ekylibre
  module FirstRun
    autoload :Counter, 'ekylibre/first_run/counter'
    autol
    
      def secure_tenant(name = nil)
        if name
          begin
            Ekylibre::Tenant.check!(name)
            Ekylibre::Tenant.create(name) unless Ekylibre::Tenant.exist?(name)
            Ekylibre::Tenant.switch(name) do
              yield
            end
          ensure
            Ekylibre::Tenant.check!(name)
          end