code: def wait_ntsc_ready(
      session: api.Session, ntsc_type: api.NTSC_Kind, eid: str
  ) -> None:
      """
      Use to wait for a notebook, tensorboard, or shell command to become ready.
      """
      name = ntsc_type.value
      loading_animator = render.Animator(
          f"Waiting for {name} to become ready"
      )
      err_msg = api.task_is_ready(
          session=session,
          task_id=eid,
          progress_report=loading_animator.next,
          timeout=60 * 30,  # seconds
      )
      msg = (
          f"{name} (id: {eid}) is ready."
          if not err_msg
          else f"Waiting stopped: {err_msg}"
      )
      loading_animator.clear(msg)
      if err_msg:
          raise errors.CliError(err_msg)
  
file_path: determined/harness/determined/cli/_util.py
imports: import argparse
  import functools
  import sys
  from typing import Any, Callable, Dict, List, Sequence
  import termcolor
  from determined.cli import errors, render
  from determined.common import api, declarative_argparse, util
  from determined.common.api import authentication, bindings, certs
  from determined.experimental import client
label_desc: Use image node_id 6 for calling a global function with example usage: wait_ntsc_ready(session, ntsc_type, eid) without return types