code: def _check_web_url(url: str, name: str) -> None:
      token = _get_auth_token_for_curl()
      bad_status_codes = []
      for _ in range(30):
          r = requests.get(
              url,
              headers={"Authorization": f"Bearer {token}"},
              allow_redirects=True,
          )
          # Sometimes the TB/JL take a bit of time to stand up, returning 502.
          # Sometimes it takes a bit of time for master to register the proxy, returning 404.
          if r.status_code == 502 or r.status_code == 404:
              time.sleep(1)
              bad_status_codes.append(r.status_code)
              continue
          r.raise_for_status()
          html = r.content.decode("utf-8")
          assert name in html  # Brutal.
          break
      else:
          error_msg = ",".join(str(v) for v in bad_status_codes)
          pytest.fail(f"{name} {url} got error codes: {error_msg}")
  
imports: import logging
  import subprocess
  import time
  import docker
  import pytest
  import requests
  from determined.common import constants
  from determined.common.api import authentication, task_is_ready, task_logs
  from determined.common.api.bindings import experimentv1State
  from tests import api_utils
  from tests import command
  from tests import config
  from tests import experiment
  from tests.cluster.test_users import det_spawn
  from .abstract_cluster import Cluster
  from .managed_cluster import ManagedCluster, get_agent_data
  from .managed_cluster_k8s import ManagedK8sCluster
  from .test_groups import det_cmd, det_cmd_json
  from .utils import assert_command_succeeded, run_command, wait_for_command_state, wait_for_task_state
label_desc: Use image node_id 19 for calling a global function with example usage: _check_web_url(url, name) without return types