def with_client
      initial_client = Esi::Client.current
      switch_to
      yield(self) if block_given?
    ensure
      initial_client.switch_to if initial_client
      Esi::Client.switch_to_default unless initial_client
    end
def with_client
      initial_client = Esi::Client.current
      switch_to
      yield(self) if block_given?
    ensure
      initial_client.switch_to if initial_client
      Esi::Client.switch_to_default unless initial_client
    end
Yield block with instance of Esi::Client and revert to
  previous client or default client

 @example Call an Esi::Client method using an instance of client
  new_client = Esi::Client.new(token: 'foo', refresh_token: 'foo', exceptionxpires_at: 30.minutes.from_now)
  new_client.with_client do |client|
    client.character(1234)
  end
  #=> Esi::Response<#>

 @yieldreturn [#block] the passed block.