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: cloud_manager.rb
    path of file: ./repos/manageiq/app/models/manageiq/providers
    
    the code of the file until where you have to start completion: module ManageIQ::Providers
  class CloudManager < BaseManager
    class << model_name
      define_method(:route_key) { "ems_clouds" }
      define_method(:singular_route_key) { "ems_cloud" }
    end

    has_many :availability_zones,  
    
    def sync_deleted_cloud_tenants
      return unless source_tenant

      source_tenant.descendants.each do |tenant|
        next if tenant.source

        if tenant.parent == source_tenant # tenant is already under provider's tenant
          _log.info("Setting source_id and source_type to nil for #{tenant.name} under provider's tenant #{source_tenant.name}")
          tenant.update(:source_id => nil, :source_type => nil)
          next
        end

        # move tenant under the provider's tenant
        _log.info("Moving out #{tenant.name} under provider's tenant #{source_tenant.name}")
        tenant.update(:parent => source_tenant, :source_id => nil, :source_type => nil)
      end