code: def create_group_assignment_request(
      session: api.Session,
      group: str,
      role: str,
      workspace: Optional[str] = None,
  ) -> List[bindings.v1GroupRoleAssignment]:
      role_obj = bindings.v1Role(
          roleId=role_name_to_role_id(session, role)
      )
      workspace_id = None
      if workspace is not None:
          workspace_id = workspace_by_name(session, workspace).id
      role_assign = bindings.v1RoleAssignment(
          role=role_obj, scopeWorkspaceId=workspace_id
      )
      group_id = group_name_to_group_id(session, group)
      return [
          bindings.v1GroupRoleAssignment(
              groupId=group_id, roleAssignment=role_assign
          )
      ]
  
file_path: determined/harness/determined/common/api/_rbac.py
imports: from typing import Dict, List, Optional
  from determined.common import api
  from determined.common.api import bindings
label_desc: Use image node_id 3 for calling a global function with example usage: create_group_assignment_request(session, group, role, workspace) and returns: list