code: def test_create_scim_user() -> None:
      username = api_utils.get_random_string()
      external_id = api_utils.get_random_string()
  
      user_req = {
          "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
          "userName": username,
          "externalId": external_id,
          "active": True,
          "name": {
              "familyName": api_utils.get_random_string(),
              "givenName": api_utils.get_random_string(),
          },
      }
  
      r = requests.post(
          make_scim_url("/Users"),
          auth=(conf.SCIM_USERNAME, conf.SCIM_PASSWORD),
          json=user_req,
      )
      r.raise_for_status()
  
      user_resp = r.json()
  
      user_id = user_resp["id"]
      user_loc = make_scim_url(f"/Users/{user_id}")
  
      assert user_resp.get("userName") == username
      assert user_resp.get("active")
      assert user_resp["meta"]["location"] == user_loc
  
      patch_req = {
          "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
          "operations": [{"op": "replace", "value": {"active": False}}],
      }
  
      r = requests.patch(
          make_scim_url(f"/Users/{user_id}"),
          auth=(conf.SCIM_USERNAME, conf.SCIM_PASSWORD),
          json=patch_req,
      )
      r.raise_for_status()
  
      patched_resp = r.json()
  
      assert not patched_resp.get("active")
  
      search_req = {"filter": f'userName eq "{username}"'}
      r = requests.get(
          make_scim_url("/Users"),
          auth=(conf.SCIM_USERNAME, conf.SCIM_PASSWORD),
          params=search_req,
      )
      r.raise_for_status()
  
      search_resp = r.json()
  
      assert search_resp["totalResults"] == 1
      assert search_resp["startIndex"] == 1
      assert len(search_resp["Resources"]) == 1
      assert search_resp["Resources"][0]["userName"] == username
      assert search_resp["Resources"][0]["meta"]["location"] == user_loc
  
      indiv_user = requests.get(
          make_scim_url(f"/Users/{user_id}"),
          auth=(conf.SCIM_USERNAME, conf.SCIM_PASSWORD),
      )
      indiv_user.raise_for_status()
      indiv_user_resp = indiv_user.json()
  
      assert indiv_user_resp.get("id") == user_id
      assert indiv_user_resp["meta"]["location"] == user_loc
  
file_path: determined/e2e_tests/tests/cluster/test_scim.py
imports: import numbers
  from urllib import parse
  import pytest
  import requests
  from tests import api_utils
  from tests import config
label_desc: Use image node_id 2 for calling a global function with example usage: test_create_scim_user() without return types