code: def test_rbac_template_delete() -> None:
      admin_session = api_utils.determined_test_session(
          conf.ADMIN_CREDENTIALS
      )
      with rbac.create_workspaces_with_users(
          [
              [  # can delete
                  (0, ["Editor"]),
                  (1, ["WorkspaceAdmin"]),
              ],
              [  # cannot delete
                  (0, ["Viewer"]),
                  (1, []),
              ],
          ]
      ) as (workspaces, creds):
          for uid in creds:
              _, tpl = setup_template_test(
                  admin_session, workspaces[0].id
              )
              bindings.delete_DeleteTemplate(
                  api_utils.determined_test_session(creds[uid]),
                  templateName=tpl.name,
              )
  
          _, tpl = setup_template_test(admin_session, workspaces[1].id)
          with pytest.raises(errors.ForbiddenException):
              bindings.delete_DeleteTemplate(
                  api_utils.determined_test_session(creds[0]),
                  templateName=tpl.name,
              )
          with pytest.raises(errors.NotFoundException):
              bindings.delete_DeleteTemplate(
                  api_utils.determined_test_session(creds[1]),
                  templateName=tpl.name,
              )
  
imports: from typing import Optional, Tuple
  import pytest
  from determined.common import util
  from determined.common.api import NTSC_Kind, Session, bindings, errors
  from tests import api_utils
  from tests import command
  from tests import config
  from tests import experiment
  from tests import template
  from tests.cluster import test_rbac
  from tests.cluster import test_users
label_desc: Use image node_id 12 for calling a global function with example usage: test_rbac_template_delete() without return types