code: def image_exists(spec: str) -> bool:
      name, tag = spec.split(":")
      try:
          r = docker_api(f"repositories/{name}/tags/{tag}")
          logging.info(
              f"Image exists, got response: {json.dumps(r, indent=2)}"
          )
          return True
      except urllib.error.HTTPError as e:
          # Image was not found
          logging.exception(e)
          return False
  
file_path: tvm/ci/scripts/jenkins/determine_docker_images.py
imports: import argparse
  import datetime
  import json
  import logging
  import urllib.error
  import configparser
  from pathlib import Path
  from typing import Dict, Any
  from http_utils import get
  from cmd_utils import init_log, REPO_ROOT
label_desc: Use image node_id 2 for calling a global function with example usage: image_exists(spec) and returns: True, False