code: def test_ntsc_proxy() -> None:
      def get_proxy(
          creds: authentication.Credentials, task_id: str
      ) -> Optional[errors.APIException]:
          session = api_utils.determined_test_session(creds)
          try:
              session.get(f"proxy/{task_id}/")
              return None
          except errors.APIException as e:
              return e
  
      with create_workspaces_with_users(
          [
              [
                  (0, ["Viewer", "Editor"]),
                  (1, ["Viewer"]),
              ],
              [
                  (2, ["Viewer"]),
              ],
          ]
      ) as (workspaces, creds):
          # launch one of each ntsc in the first workspace
          for typ in conf.PROXIED_NTSC:
              experiment_id = None
              if typ == api.NTSC_Kind.tensorboard:
                  pid = bindings.post_PostProject(
                      api_utils.determined_test_session(creds[0]),
                      body=bindings.v1PostProjectRequest(
                          name="test", workspaceId=workspaces[0].id
                      ),
                      workspaceId=workspaces[0].id,
                  ).project.id
  
                  with logged_in_user(creds[0]):
                      # experiment for tensorboard
                      experiment_id = exp.create_experiment(
                          conf.fixtures_path("no_op/single.yaml"),
                          conf.fixtures_path("no_op"),
                          ["--project_id", str(pid)],
                      )
  
              created_id = api_utils.launch_ntsc(
                  api_utils.determined_test_session(creds[0]),
                  workspaces[0].id,
                  typ,
                  experiment_id,
              ).id
  
              print(f"created {typ} {created_id}")
              api.wait_for_ntsc_state(
                  api_utils.determined_test_session(creds[0]),
                  api.NTSC_Kind(typ),
                  created_id,
                  lambda s: s == bindings.taskv1State.RUNNING,
                  timeout=300,
              )
              deets = api.get_ntsc_details(
                  api_utils.determined_test_session(creds[0]),
                  typ,
                  created_id,
              )
              assert (
                  deets.state == bindings.taskv1State.RUNNING
              ), f"{typ} should be running"
              err = api.task_is_ready(
                  api_utils.determined_test_session(
                      conf.ADMIN_CREDENTIALS
                  ),
                  created_id,
              )
              assert err is None, f"{typ} should be ready {err}"
              assert (
                  get_proxy(creds[0], created_id) is None
              ), f"user 0 should be able to access {typ} through proxy"
              assert (
                  get_proxy(creds[1], created_id) is None
              ), f"user 1 should be able to access {typ} through proxy"
              view_err = get_proxy(creds[2], created_id)
              assert (
                  view_err is not None
              ), f"user 2 should not be able to access {typ} through proxy"
              assert (
                  view_err.status_code == 404
              ), f"user 2 should error out with not found{typ}"
  
              # kill the ntsc
              api_utils.kill_ntsc(
                  api_utils.determined_test_session(creds[0]),
                  typ,
                  created_id,
              )
  
file_path: determined/e2e_tests/tests/cluster/test_rbac_ntsc.py
imports: import contextlib
  from typing import Generator, List, Optional, Sequence
  import pytest
  import tests.config
  from determined.common import api
  from determined.common.api import authentication, bindings, errors
  from tests import api_utils
  from tests import experiment
  from tests.cluster.test_rbac import create_workspaces_with_users, rbac_disabled
  from tests.cluster.test_workspace_org import setup_workspaces
  from .test_groups import det_cmd_json
  from .test_users import logged_in_user
label_desc: Use image node_id 6 for calling a global function with example usage: test_ntsc_proxy() and returns: None, e