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: locale_helper.rb
    path of file: ./repos/identity-idp/app/helpers
    
    the code of the file until where you have to start completion: module LocaleHelper
  def locale_url_
    
  def with_user_locale(user, &block)
    locale = user.email_language

    if I18n.locale_available?(locale)
      I18n.with_locale(locale, &block)
    else
      Rails.logger.warn("user_id=#{user.uuid} has bad email_language=#{locale}") if locale.present?

      yield
    end