code: def test_add_remove_client_ee() -> None:
      api_utils.configure_token_store(conf.ADMIN_CREDENTIALS)
  
      # Test SDK.
      det_obj = _client.Determined(master=conf.make_master_url())
      client = det_obj.add_oauth_client(
          domain="XXXSDK", name="sdk_oauth_client_test"
      )
      remove_id = client.id
      det_obj.remove_oauth_client(client_id=remove_id)
      list_client_ids = [
          oclient.id for oclient in det_obj.list_oauth_clients()
      ]
      assert remove_id not in list_client_ids
  
      # Test CLI.
      command = [
          "det",
          "-m",
          conf.make_master_url(),
          "oauth",
          "client",
          "add",
          "XXXCLI",
          "cli_test_oauth_client",
      ]
      output = str(subprocess.check_output(command)).split("\\n")[0]
      assert "ID" in output
      r = "(.*)ID:(\\s*)(.*)"
      m = re.match(r, output)
      assert m is not None
      remove_id = m.group(3)
      command = [
          "det",
          "-m",
          conf.make_master_url(),
          "oauth",
          "client",
          "remove",
          str(remove_id),  # only one OAuth client is allowed.
      ]
      subprocess.run(command, check=True)
      list_client_ids = [
          oclient.id for oclient in det_obj.list_oauth_clients()
      ]
      assert remove_id not in list_client_ids
  
      # non-admin users are not allowed to call Oauth API.
      new_creds = api_utils.create_test_user()
      api_utils.configure_token_store(new_creds)
      det_obj = _client.Determined(master=conf.make_master_url())
      with pytest.raises(api.errors.ForbiddenException):
          client = det_obj.add_oauth_client(
              domain="XXXSDK", name="sdk_oauth_client_test"
          )
  
      # non-admin users are not allowed to call Oauth API.
      with pytest.raises(api.errors.ForbiddenException):
          det_obj.remove_oauth_client(client_id="non-admin-call")
  
file_path: determined/e2e_tests/tests/cluster/test_oauth2_scim_client.py
imports: import re
  import subprocess
  import pytest
  import determined
  from determined.common import api
  from determined.experimental import client
  from tests import api_utils
  from tests import config
label_desc: Use image node_id 5 for calling a global function with example usage: test_add_remove_client_ee() without return types