code: def test_rotate_api_key(self):
      # Admin can change other's API key
      account = self.service.create_account(self.auth)
      old_api_key = account.api_key
      non_admin_auth = Authentication(account.api_key)
      account = self.service.rotate_api_key(self.auth, account)
      assert account.api_key != old_api_key
  
      # Only admins can change API key for a user
      raised = False
      try:
          self.service.rotate_api_key(non_admin_auth, account)
      except Exception as e:
          raised = True
          assert type(e) == AuthenticationError
      assert raised
  
imports: import copy
  import pytest
  import shutil
  import tempfile
  from helm.common.authentication import Authentication
  from helm.common.request import Request
  from helm.proxy.accounts import AuthenticationError, Accounts
  from helm.proxy.query import Query
  from .server_service import ServerService
label_desc: Use image node_id 11 for calling the TestServerService obj's underlying member method code with example usage: obj.test_rotate_api_key() without return types