code: def test_cache_success(self):
      call_count = 0
  
      class UsernameProvider(auth.AuthProvider):
          def authenticate(self, environ):
              nonlocal call_count
              call_count += 1
              return environ["username"]
  
      providers = {UsernameProvider: UsernameProvider()}
      auth_ctx = auth.AuthContext(providers, {"username": "whoami"})
      self.assertEqual(auth_ctx.get(UsernameProvider), "whoami")
      self.assertEqual(auth_ctx.get(UsernameProvider), "whoami")
      self.assertEqual(call_count, 1)
  
imports: from tensorboard import auth
  from tensorboard import test
label_desc: Use image node_id 1 for calling the AuthContextTest obj's underlying member method code with example usage: obj.test_cache_success() and returns: environ