code: def test_group_creation(add_users: List[str]) -> None:
      with logged_in_user(conf.ADMIN_CREDENTIALS):
          group_name = get_random_string()
          create_group_cmd = ["user-group", "create", group_name]
          for add_user in add_users:
              create_group_cmd += ["--add-user", add_user]
          det_cmd(create_group_cmd, check=True)
  
          # Can view through list.
          group_list = det_cmd_json(["user-group", "list", "--json"])
          assert (
              len(
                  [
                      group
                      for group in group_list["groups"]
                      if group["group"]["name"] == group_name
                  ]
              )
              == 1
          )
  
          # Can view through list with userID filter.
          for add_user in add_users:
              group_list = det_cmd_json(
                  [
                      "user-group",
                      "list",
                      "--json",
                      "--groups-user-belongs-to",
                      add_user,
                  ]
              )
              assert (
                  len(
                      [
                          group
                          for group in group_list["groups"]
                          if group["group"]["name"] == group_name
                      ]
                  )
                  == 1
              )
  
          # Can describe properly.
          group_desc = det_cmd_json(
              ["user-group", "describe", group_name, "--json"]
          )
          assert group_desc["name"] == group_name
          for add_user in add_users:
              assert (
                  len(
                      [
                          u
                          for u in group_desc["users"]
                          if u["username"] == add_user
                      ]
                  )
                  == 1
              )
  
          # Can delete.
          det_cmd(
              ["user-group", "delete", group_name, "--yes"], check=True
          )
          det_cmd_expect_error(
              ["user-group", "describe", group_name], "not find"
          )
  
file_path: determined/e2e_tests/tests/cluster/test_groups.py
imports: import json
  import subprocess
  from typing import Any, List
  import pytest
  from tests import config
  from .test_users import get_random_string, logged_in_user
label_desc: Use image node_id 4 for calling a global function with example usage: test_group_creation(add_users) without return types