code: def _test_view(host, port, exit_f):
      view_url = util.local_server_url(host, port)
      try:
          _wait_for(view_url)
          _test_runs(view_url)
          _test_tensorboard(view_url)
      except Exception:
          log.exception("testing %s", view_url)
          exit_f(1)
      else:
          exit_f(0)
  
file_path: guildai/guild/commands/view_tester.py
imports: import json
  import logging
  import sys
  import threading
  import time
  from guild import util
label_desc: Use image node_id 2 for calling a global function with example usage: _test_view(host, port, exit_f) without return types