code: def test_group_access() -> None:
      # create relevant workspace and project, with group having access
      group_name = api_utils.get_random_string()
      workspace_name = api_utils.get_random_string()
      with logged_in_user(conf.ADMIN_CREDENTIALS):
          det_cmd(["workspace", "create", workspace_name], check=True)
          det_cmd(["user-group", "create", group_name], check=True)
          det_cmd(
              [
                  "rbac",
                  "assign-role",
                  "WorkspaceAdmin",
                  "-w",
                  workspace_name,
                  "-g",
                  group_name,
              ],
              check=True,
          )
  
      # create test user which cannot access workspace
      creds1 = api_utils.create_test_user()
      with logged_in_user(creds1):
          det_cmd_expect_error(
              ["workspace", "describe", workspace_name],
              "Failed to describe workspace",
          )
  
      # add user to group
      with logged_in_user(conf.ADMIN_CREDENTIALS):
          det_cmd(
              ["user-group", "add-user", group_name, creds1.username],
              check=True,
          )
  
      # with user now in group, access possible
      with logged_in_user(creds1):
          det_cmd(["workspace", "describe", workspace_name], check=True)
  
imports: import contextlib
  from typing import Any, Callable, Dict, Generator, List, NamedTuple, Optional, Tuple
  import pytest
  from determined.common import api
  from determined.common.api import authentication, bindings, errors
  from tests import api_utils
  from tests import config
  from tests.cluster.test_workspace_org import setup_workspaces
  from .test_groups import det_cmd, det_cmd_expect_error, det_cmd_json
  from .test_users import logged_in_user
label_desc: Use image node_id 13 for calling a global function with example usage: test_group_access() without return types